fix: prompt_context (foreground), changes to box theme

This commit is contained in:
Armin Jenewein 2015-03-18 13:11:11 +01:00
commit dc79ff4466
2 changed files with 8 additions and 4 deletions

View file

@ -1,10 +1,14 @@
# use $HOME/.zsh/256-color-test.py to test colors.
echo true
# user colors
prompt_context_user_fg="252"
prompt_context_user_bg="240"
# root colors
prompt_context_root_fg="152"
prompt_context_root_bg="32"
prompt_context_root_fg="172"
prompt_context_root_bg="52"

View file

@ -83,10 +83,10 @@ prompt_context() {
local machine="$(hostname -s)"
if [[ "$user" == "root" ]]; then
# prompt for root
prompt_segment "$prompt_context_root_bg" "$prompt_context_root_fg" "%(!.%{%F{red}%}.)$user@$machine"
prompt_segment "$prompt_context_root_bg" "$prompt_context_root_fg" "%(!.%{%F{${prompt_context_root_fg}}%}.)$user@$machine"
else
# prompt for normal user
prompt_segment "$prompt_context_user_bg" "$prompt_context_user_fg" "%(!.%{%F{yellow}%}.)$user@$machine"
prompt_segment "$prompt_context_user_bg" "$prompt_context_user_fg" "%(!.%{%F{${prompt_context_user_fg}}%}.)$user@$machine"
fi
}