aboutsummaryrefslogtreecommitdiffstats
path: root/zuwu.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zuwu.zsh')
-rwxr-xr-xzuwu.zsh3
1 files changed, 2 insertions, 1 deletions
diff --git a/zuwu.zsh b/zuwu.zsh
index dab83db..c3e5100 100755
--- a/zuwu.zsh
+++ b/zuwu.zsh
@@ -249,7 +249,8 @@ elif [[ "$_ZUWU_HYPERFAST-$_ZUWU_NO_PROMPT" == "-" ]]; then
b="$(printf "%.0f" $(echo "$b * 255" | bc -l))"
echo -n "${r};${g};${b}"
}
- local _SYS_RGB="${SYS_RGB:-"$(hsv2rgb "${SYS_HSV_HUE:-"$((0x$(sha256sum <<< "${HOST%%.*}" | cut -c 1-2) * 360 / 256))"}" "${SYS_HSV_SATURATION:-60}" "${SYS_HSV_VALUE:-70}")"}"
+ local _SHORTHOST_HASH="$(sha256sum <<< "${HOST%%.*}")"
+ local _SYS_RGB="${SYS_RGB:-"$(hsv2rgb "${SYS_HSV_HUE:-"$((0x${_SHORTHOST_HASH:0:2} * 360 / 256))"}" "${SYS_HSV_SATURATION:-60}" "${SYS_HSV_VALUE:-70}")"}"
local _USER_RGB="${USER_RGB:-"$_SYS_RGB"}"
# unset -f hsv2rgb