From 65c4ae4abfda2eca047ba93081686ff27d674097 Mon Sep 17 00:00:00 2001 From: romkatv Date: Sun, 16 Feb 2020 17:38:55 +0100 Subject: [PATCH] grey Git status in robbyrussell while loading --- config/p10k-robbyrussell.zsh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/config/p10k-robbyrussell.zsh b/config/p10k-robbyrussell.zsh index ec880fea..160efb90 100644 --- a/config/p10k-robbyrussell.zsh +++ b/config/p10k-robbyrussell.zsh @@ -61,12 +61,12 @@ else # Use VCS_STATUS_* parameters to assemble Git status. See reference: # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. - typeset -g my_git_format='%B%F{blue}git:(%F{red}' + typeset -g my_git_format="${1+%B%4F}git:(${1+%1F}" my_git_format+=${${VCS_STATUS_LOCAL_BRANCH:-${VCS_STATUS_COMMIT[1,8]}}//\%/%%} - my_git_format+='%F{blue})' + my_git_format+="${1+%4F})" if (( VCS_STATUS_NUM_CONFLICTED || VCS_STATUS_NUM_STAGED || VCS_STATUS_NUM_UNSTAGED || VCS_STATUS_NUM_UNTRACKED )); then - my_git_format+=' %F{yellow}✗' + my_git_format+=" ${1+%3F}✗" fi fi } @@ -75,9 +75,10 @@ # Disable the default Git status formatting. typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true # Install our own Git status formatter. - typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter()))+${my_git_format}}' - # Disable loading indicator. - typeset -g POWERLEVEL9K_VCS_LOADING_TEXT='%{%}' + typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}' + typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter()))+${my_git_format}}' + # Grey Git status when loading. + typeset -g POWERLEVEL9K_VCS_LOADING_FOREGROUND=246 # Instant prompt mode. #