Clear highlighting before setting colors
This commit is contained in:
parent
3ea3451417
commit
9b58b7cdb7
1 changed files with 20 additions and 20 deletions
40
neofetch
40
neofetch
|
@ -2311,30 +2311,30 @@ colors () {
|
|||
}
|
||||
|
||||
setcolors () {
|
||||
c1="\033[3${1}m"
|
||||
c2="\033[3${2}m"
|
||||
c3="\033[3${3}m"
|
||||
c4="\033[3${4}m"
|
||||
c5="\033[3${5}m"
|
||||
c6="\033[3${6}m"
|
||||
c1="\033[0m\033[3${1}m"
|
||||
c2="\033[0m\033[3${2}m"
|
||||
c3="\033[0m\033[3${3}m"
|
||||
c4="\033[0m\033[3${4}m"
|
||||
c5="\033[0m\033[3${5}m"
|
||||
c6="\033[0m\033[3${6}m"
|
||||
|
||||
if [ "${colors[0]}" == "distro" ]; then
|
||||
title_color="\033[3${1}m"
|
||||
at_color="\033[0m"
|
||||
underline_color="\033[0m"
|
||||
subtitle_color="\033[3${2}m"
|
||||
colon_color="\033[0m"
|
||||
info_color="\033[0m"
|
||||
title_color="\033[0m\033[3${1}m"
|
||||
at_color="\033[0m\033[0m"
|
||||
underline_color="\033[0m\033[0m"
|
||||
subtitle_color="\033[0m\033[3${2}m"
|
||||
colon_color="\033[0m\033[0m"
|
||||
info_color="\033[0m\033[0m"
|
||||
|
||||
# If the second color is white use the first for the subtitle
|
||||
[ "$2" == 7 ] && subtitle_color="\033[3${1}m"
|
||||
[ "$2" == 7 ] && subtitle_color="\033[0m\033[3${1}m"
|
||||
else
|
||||
title_color="\033[3${colors[0]}m"
|
||||
at_color="\033[3${colors[1]}m"
|
||||
underline_color="\033[3${colors[2]}m"
|
||||
subtitle_color="\033[3${colors[3]}m"
|
||||
colon_color="\033[3${colors[4]}m"
|
||||
info_color="\033[3${colors[5]}m"
|
||||
title_color="\033[0m\033[3${colors[0]}m"
|
||||
at_color="\033[0m\033[3${colors[1]}m"
|
||||
underline_color="\033[0m\033[3${colors[2]}m"
|
||||
subtitle_color="\033[0m\033[3${colors[3]}m"
|
||||
colon_color="\033[0m\033[3${colors[4]}m"
|
||||
info_color="\033[0m\033[3${colors[5]}m"
|
||||
fi
|
||||
|
||||
[ "$progress_color_elapsed" == "distro" ] && \
|
||||
|
@ -2349,7 +2349,7 @@ setcolors () {
|
|||
}
|
||||
|
||||
color () {
|
||||
printf "%b%s" "\033[3${1}m"
|
||||
printf "%b%s" "\033[0m\033[3${1}m"
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue