diff --git a/zsh/zshrc b/zsh/zshrc index 824efc1..88e05a2 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -72,7 +72,7 @@ function dotfiles-update() { function context-color() { hexcount=$(($(infocmp -1 | sed -n -e 's/^\t*colors#\([0-9]x\?[0-9]*\),.*/\1/p')-1)) hash=$(printf "%d\n" "0x$(hostname | md5sum | head -c 6 | tr '[:lower:]' '[:upper:]')") - excludes="0,7,15,253" + excludes="0,7,15" id=$(( $hash % $hexcount )) for excid in $(echo "$excludes" | tr "," '\n'); do if [ "$id" -eq "$excid" ]; then @@ -94,7 +94,7 @@ typeset -g POWERLEVEL9K_CONTEXT_PREFIX= typeset -g POWERLEVEL9K_CONTEXT_DEFAULT_BACKGROUND=$(context-color) typeset -g POWERLEVEL9K_CONTEXT_REMOTE_BACKGROUND=${POWERLEVEL9K_CONTEXT_DEFAULT_BACKGROUND} typeset -g POWERLEVEL9K_CONTEXT_USE_BLACK_FG=(253) -if [[ -n "${POWERLEVEL9K_CONTEXT_USE_BLACK_FG}[(r)${POWERLEVEL9K_CONTEXT_DEFAULT_BACKGROUND}]}" ]]; then +if [[ -n "${POWERLEVEL9K_CONTEXT_USE_BLACK_FG[(r)${POWERLEVEL9K_CONTEXT_DEFAULT_BACKGROUND}]}" ]]; then typeset -g POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND=0 typeset -g POWERLEVEL9K_CONTEXT_REMOTE_FOREGROUND=0 else;