fix(zsh): legible server prompt colours
Named ANSI colours are remapped by the terminal theme; under gruvbox white-on-red and white-on-blue were barely readable. Use fixed 256-colour indices with ~7:1 contrast. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4594ad337a
commit
7edb68aaba
1 file changed
+15
-8
@@ -25,15 +25,22 @@ typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status command_execution_time tim
|
||||
typeset -g POWERLEVEL9K_ALWAYS_SHOW_CONTEXT=true
|
||||
typeset -g POWERLEVEL9K_ALWAYS_SHOW_USER=true
|
||||
typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'
|
||||
typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=red
|
||||
typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=white
|
||||
typeset -g POWERLEVEL9K_CONTEXT_DEFAULT_BACKGROUND=red
|
||||
typeset -g POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND=white
|
||||
typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=red
|
||||
typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=yellow
|
||||
#
|
||||
# Fixed 256-colour indices, not the named ANSI colours. Terminal themes remap
|
||||
# the first 16 freely - under gruvbox "white" is a mid grey and "blue" a muted
|
||||
# teal, which left the text barely legible. 231 is pure white; 124 and 24 are
|
||||
# dark enough to give it roughly 7:1 contrast on either segment.
|
||||
typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=124
|
||||
typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=231
|
||||
typeset -g POWERLEVEL9K_CONTEXT_DEFAULT_BACKGROUND=124
|
||||
typeset -g POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND=231
|
||||
typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=124
|
||||
typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=226
|
||||
|
||||
typeset -g POWERLEVEL9K_DIR_BACKGROUND=blue
|
||||
typeset -g POWERLEVEL9K_DIR_FOREGROUND=white
|
||||
typeset -g POWERLEVEL9K_DIR_BACKGROUND=24
|
||||
typeset -g POWERLEVEL9K_DIR_FOREGROUND=231
|
||||
typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=252
|
||||
typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=231
|
||||
typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
|
||||
|
||||
# Only mention how long something took when it was long enough to notice.
|
||||
|
||||
Reference in new issue
Block a user