From f89c4a7a035fe68f9a69444477fbda581773e783 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 24 Jan 2021 15:17:32 +0100 Subject: zsh: tweaks --- user-profiles/zsh/p10k.zsh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/user-profiles/zsh/p10k.zsh b/user-profiles/zsh/p10k.zsh index d0dda29c..e3b364c2 100644 --- a/user-profiles/zsh/p10k.zsh +++ b/user-profiles/zsh/p10k.zsh @@ -33,10 +33,12 @@ typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( # =========================[ Line #1 ]========================= # os_icon # os identifier + context # user@hostname dir # current directory vcs # git status # =========================[ Line #2 ]========================= newline # \n + context # user@hostname dir prompt_char # prompt symbol ) @@ -86,7 +88,6 @@ azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) gcloud # google cloud cli account and project (https://cloud.google.com/) google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) - context # user@hostname nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) ranger # ranger shell (https://github.com/ranger/ranger) nnn # nnn shell (https://github.com/jarun/nnn) @@ -190,7 +191,7 @@ # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' ################################[ prompt_char: prompt symbol ]################################ - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=010 + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=2 # Default prompt symbol. typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' # Prompt symbol in command vi mode. @@ -827,9 +828,9 @@ # Context color when running with privileges. typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178 # Context color in SSH without privileges. - typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180 + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=31 # Default context color (no privileges, no SSH). - typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180 + typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=31 # Context format when running with privileges: bold user@hostname. typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m' @@ -1544,8 +1545,8 @@ # typed after changing current working directory. typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off - function p10k-on-pre-prompt() { p10k display '1'=show '2/left/dir'=hide '2/right/*'=show '2/right/(status|command_execution_time|time|background_jobs)'=hide } - function p10k-on-post-prompt() { p10k display '2/left/(dir|prompt_char)'=show 'empty_line|1'=hide '2/right/*'=hide '2/right/(status|command_execution_time|time|background_jobs)'=show } + function p10k-on-pre-prompt() { p10k display '1'=show '2/left/(dir|context)'=hide '2/right/*'=show '2/right/(status|command_execution_time|time|background_jobs)'=hide } + function p10k-on-post-prompt() { p10k display '2/left/(dir|context|prompt_char)'=show 'empty_line|1'=hide '2/right/*'=hide '2/right/(status|command_execution_time|time|background_jobs)'=show } # Instant prompt mode. # -- cgit v1.2.3