summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-11-15 17:41:42 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-11-15 17:41:42 +0300
commita6531a658655ae666e2659418e14c5a3173d3a90 (patch)
tree126dda4f90d515f9445e93a5a16cc2b4b86d269d
parent1777bd41a68c99963e009c55a0f500396e485d07 (diff)
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
-rw-r--r--config/p10k-rainbow.zsh4
-rwxr-xr-xinternal/wizard.zsh7
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