From a6531a658655ae666e2659418e14c5a3173d3a90 Mon Sep 17 00:00:00 2001 From: romkatv Date: Fri, 15 Nov 2019 15:41:42 +0100 Subject: [PATCH] black os_ison on white background in rainbow style. otherwise it sucks on both MS terminals as they cannot differentiate between black and no background --- config/p10k-rainbow.zsh | 4 ++-- internal/wizard.zsh | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 2e2e93bb..070e4f5d 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -188,8 +188,8 @@ #################################[ os_icon: os identifier ]################################## # OS identifier color. - typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=255 - # typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=0 + typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232 + typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7 # Make the icon bold. typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='%B${P9K_CONTENT}' diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 651ffa1b..ee91a723 100755 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -93,7 +93,7 @@ typeset -ra pure_right=( ) typeset -ra rainbow_left=( - '%$frame_color[$color]F╭─' '%F{${${extra_icons[1]:+0}:-4}}$left_tail${extra_icons[1]:+%K{0\} $extra_icons[1] %K{4\}%0F$left_sep}%K{4}%254F $extra_icons[2]%B%255F~%b%K{4}%254F/%B%255Fsrc%b%K{4} %K{2}%4F$left_sep %0F$prefixes[1]$extra_icons[3]master %k%2F$left_head%f' + '%$frame_color[$color]F╭─' '%F{${${extra_icons[1]:+7}:-4}}$left_tail${extra_icons[1]:+%K{7\} $extra_icons[1] %K{4\}%7F$left_sep}%K{4}%254F $extra_icons[2]%B%255F~%b%K{4}%254F/%B%255Fsrc%b%K{4} %K{2}%4F$left_sep %0F$prefixes[1]$extra_icons[3]master %k%2F$left_head%f' '%$frame_color[$color]F╰─' '%f ${buffer:-█}' ) @@ -773,8 +773,10 @@ function ask_extra_icons() { time_icon=${time_icon// } fi branch_icon=${branch_icon// } - if [[ $style == (classic|rainbow) ]]; then + if [[ $style == classic ]]; then os_icon="%255F$os_icon%f" + elif [[ $style == rainbow ]]; then + os_icon="%F{232}$os_icon%f" else os_icon="%f$os_icon" fi @@ -1747,6 +1749,7 @@ while true; do ask_time || continue ask_separators || continue ask_heads || continue + ask_extra_icons || continue ask_tails || continue ask_num_lines || continue ask_gap_char || continue