mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-20 03:13:33 +01:00
fix: prompt_context (foreground), changes to box theme
This commit is contained in:
parent
222226ffb6
commit
dc79ff4466
2 changed files with 8 additions and 4 deletions
|
|
@ -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"
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue