zsh: use hostnamectl instead of hostname

hostname is not available by default on a new arch install
This commit is contained in:
Guillaume Dott 2026-08-21 10:51:28 +02:00
parent 34499f914d
commit 458fc5e98c

View File

@ -100,7 +100,7 @@ then
COLOR="red" COLOR="red"
else else
colors=(blue green cyan magenta yellow) colors=(blue green cyan magenta yellow)
color_index=$(($(hostname | sum | cut -f1 -d" ") % $#colors + 1)) color_index=$(($(hostnamectl hostname | sum | cut -f1 -d" ") % $#colors + 1))
COLOR=$colors[$color_index] COLOR=$colors[$color_index]
fi fi