make os_icon non-bold

pull/573/head
romkatv 5 years ago
parent a52cff3024
commit 6f9ae0fd17

@ -1531,15 +1531,14 @@ The last line on the screenshot shows a cut off Arch Linux logo.
There are several mitigation options for this issue. There are several mitigation options for this issue.
1. Use a different terminal. Konsole is the only terminal that exhibits this behavior. 1. Use a different terminal. Konsole is the only terminal that exhibits this behavior.
2. Use a monospace font. For example, [the recommended Powerlevel10k font]( 2. Use a monospace font.
#meslo-nerd-font-patched-for-powerlevel10k).
3. Manually add an extra space after the icon that gets cut off. For example, if the content of 3. Manually add an extra space after the icon that gets cut off. For example, if the content of
`os_icon` prompt segment gets cut off, open `~/.p10k.zsh`, search for `os_icon` prompt segment gets cut off, open `~/.p10k.zsh`, search for
`POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION` and change it as follows: `POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION` and change it as follows:
```zsh ```zsh
typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='%B${P9K_CONTENT} ' # extra space at the end typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='${P9K_CONTENT} ' # extra space at the end
``` ```
4. Use a different icon that isn't monospace. For example, if Arch Linux logo gets cut off, add 4. Use a different icon that is monospace. For example, if Arch Linux logo gets cut off, add
the following parameter to `~/.p10k.zsh`: the following parameter to `~/.p10k.zsh`:
```zsh ```zsh
typeset -g POWERLEVEL9K_LINUX_ARCH_ICON='Arch' # plain "Arch" in place of a logo typeset -g POWERLEVEL9K_LINUX_ARCH_ICON='Arch' # plain "Arch" in place of a logo

@ -174,8 +174,8 @@
#################################[ os_icon: os identifier ]################################## #################################[ os_icon: os identifier ]##################################
# OS identifier color. # OS identifier color.
typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=255 typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=255
# Make the icon bold. # Custom icon.
typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='%B${P9K_CONTENT}' # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐'
################################[ prompt_char: prompt symbol ]################################ ################################[ prompt_char: prompt symbol ]################################
# Transparent background. # Transparent background.

@ -174,7 +174,7 @@
# OS identifier color. # OS identifier color.
typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND= typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=
# Custom icon. # Custom icon.
typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='${P9K_CONTENT}' # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐'
################################[ prompt_char: prompt symbol ]################################ ################################[ prompt_char: prompt symbol ]################################
# Green prompt symbol if the last command succeeded. # Green prompt symbol if the last command succeeded.

@ -172,8 +172,8 @@
# OS identifier color. # OS identifier color.
typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232 typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232
typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7 typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7
# Make the icon bold. # Custom icon.
typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='%B${P9K_CONTENT}' # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐'
################################[ prompt_char: prompt symbol ]################################ ################################[ prompt_char: prompt symbol ]################################
# Transparent background. # Transparent background.

@ -50,7 +50,7 @@ local -r time_24h='16:23:42'
local -r time_12h='04:23:42 PM' local -r time_12h='04:23:42 PM'
local -ra lean_left=( local -ra lean_left=(
'%$frame_color[$color]F╭─ ' '${extra_icons[1]:+$extra_icons[1] }%31F$extra_icons[2]%B%39F~%b%31F/%B%39Fsrc%b%f $prefixes[1]%76F$extra_icons[3]master%f ' '%$frame_color[$color]F╭─ ' '${extra_icons[1]:+%B%f$extra_icons[1] %b}%31F$extra_icons[2]%B%39F~%b%31F/%B%39Fsrc%b%f $prefixes[1]%76F$extra_icons[3]master%f '
'%$frame_color[$color]F╰─' '%76F$prompt_char%f ${buffer:-$cursor}' '%$frame_color[$color]F╰─' '%76F$prompt_char%f ${buffer:-$cursor}'
) )
@ -60,7 +60,7 @@ local -ra lean_right=(
) )
local -ra lean_8colors_left=( local -ra lean_8colors_left=(
'%$frame_color[$color]F╭─ ' '${extra_icons[1]:+$extra_icons[1] }%4F$extra_icons[2]%4F~/src%f $prefixes[1]%2F$extra_icons[3]master%f ' '%$frame_color[$color]F╭─ ' '${extra_icons[1]:+%f$extra_icons[1] }%4F$extra_icons[2]%4F~/src%f $prefixes[1]%2F$extra_icons[3]master%f '
'%$frame_color[$color]F╰─' '%2F$prompt_char%f ${buffer:-$cursor}' '%$frame_color[$color]F╰─' '%2F$prompt_char%f ${buffer:-$cursor}'
) )
@ -70,7 +70,7 @@ local -ra lean_8colors_right=(
) )
local -ra classic_left=( local -ra classic_left=(
'%$frame_color[$color]F╭─' '%F{$bg_color[$color]}$left_tail%K{$bg_color[$color]} ${extra_icons[1]:+$extra_icons[1]%K{$bg_color[$color]\} %$sep_color[$color]F$left_subsep%f }%31F$extra_icons[2]%B%39F~%b%K{$bg_color[$color]}%31F/%B%39Fsrc%b%K{$bg_color[$color]} %$sep_color[$color]F$left_subsep%f %$prefix_color[$color]F$prefixes[1]%76F$extra_icons[3]master %k%$bg_color[$color]F$left_head%f' '%$frame_color[$color]F╭─' '%F{$bg_color[$color]}$left_tail%K{$bg_color[$color]} ${extra_icons[1]:+%255F$extra_icons[1] %$sep_color[$color]F$left_subsep%f }%31F$extra_icons[2]%B%39F~%b%K{$bg_color[$color]}%31F/%B%39Fsrc%b%K{$bg_color[$color]} %$sep_color[$color]F$left_subsep%f %$prefix_color[$color]F$prefixes[1]%76F$extra_icons[3]master %k%$bg_color[$color]F$left_head%f'
'%$frame_color[$color]F╰─' '%f ${buffer:-$cursor}' '%$frame_color[$color]F╰─' '%f ${buffer:-$cursor}'
) )
@ -90,7 +90,7 @@ local -ra pure_right=(
) )
local -ra rainbow_left=( local -ra rainbow_left=(
'%$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{${${extra_icons[1]:+7}:-4}}$left_tail${extra_icons[1]:+%K{7\}%232F $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:-$cursor}' '%$frame_color[$color]F╰─' '%f ${buffer:-$cursor}'
) )
@ -1059,13 +1059,6 @@ function ask_extra_icons() {
local duration_icon=${(g::)icons[EXECUTION_TIME_ICON]} local duration_icon=${(g::)icons[EXECUTION_TIME_ICON]}
local time_icon=${(g::)icons[TIME_ICON]} local time_icon=${(g::)icons[TIME_ICON]}
branch_icon=${branch_icon// } branch_icon=${branch_icon// }
if [[ $style == classic ]]; then
os_icon="%B%255F$os_icon%f%b"
elif [[ $style == rainbow ]]; then
os_icon="%B%F{232}$os_icon%f%b"
elif [[ $style != lean_8colors ]]; then
os_icon="%B%f$os_icon%b"
fi
local few=('' '' '' '' '') local few=('' '' '' '' '')
local many=("$os_icon" "$dir_icon " "$vcs_icon $branch_icon " "$duration_icon " "$time_icon ") local many=("$os_icon" "$dir_icon " "$vcs_icon $branch_icon " "$duration_icon " "$time_icon ")
while true; do while true; do

Loading…
Cancel
Save