From 9b58b7cdb72d880b0de26bb5aa1c004fcd44765b Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 29 Mar 2016 18:28:26 +1100 Subject: [PATCH] Clear highlighting before setting colors --- neofetch | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/neofetch b/neofetch index 83d01ef5..45105a72 100755 --- a/neofetch +++ b/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" }