diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2015-12-15 03:21:15 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2015-12-15 04:08:59 +0300 |
commit | 6f7d6f7259d33233288dca3b5657c89550023389 (patch) | |
tree | e1fb728f9f23a9dae85b3ea9a0588894f246bead /powerlevel9k.zsh-theme | |
parent | c5726bc548a4a8b82db480ec55ee04ceae31624e (diff) |
For left aligned segments start the foreground color after the visual
identifier has been printed.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 9b74cd87..4657d3e5 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -142,7 +142,7 @@ left_prompt_segment() { [[ -n $3 ]] && fg="%F{$3}" || fg="%f" if [[ $CURRENT_BG != 'NONE' ]] && ! isSameColor "$2" "$CURRENT_BG"; then # Middle segment - echo -n "%{$bg%F{$CURRENT_BG}%}$(print_icon 'LEFT_SEGMENT_SEPARATOR')%{$fg%}$POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS" + echo -n "%{$bg%F{$CURRENT_BG}%}$(print_icon 'LEFT_SEGMENT_SEPARATOR')$POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS" elif isSameColor "$CURRENT_BG" "$2"; then # Middle segment with same color as previous segment # We take the current foreground color as color for our @@ -150,10 +150,10 @@ left_prompt_segment() { # enough contrast. local complement [[ -n $3 ]] && complement=$3 || complement=$DEFAULT_COLOR - echo -n "%{$bg%F{$complement}%}$(print_icon 'LEFT_SUBSEGMENT_SEPARATOR')%{$fg%}$POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS" + echo -n "%{$bg%F{$complement}%}$(print_icon 'LEFT_SUBSEGMENT_SEPARATOR')$POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS" else # First segment - echo -n "%{$bg%}%{$fg%}$POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS" + echo -n "%{$bg%}$POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS" fi local visual_identifier @@ -167,7 +167,7 @@ left_prompt_segment() { [[ -n $4 ]] && visual_identifier="$visual_identifier " fi - echo -n "$visual_identifier$4$POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS" + echo -n "$visual_identifier%{$fg%}$4$POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS" CURRENT_BG=$2 } |