From 4a06a4a1e27ad759f11f2a1e5bdf1213fcc61af1 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 26 Mar 2016 08:54:33 +1100 Subject: [PATCH] Reset colors before setting them --- neofetch | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/neofetch b/neofetch index 58614836..a7b9fc77 100755 --- a/neofetch +++ b/neofetch @@ -2339,30 +2339,30 @@ colors () { } setcolors () { - c1="\033[38;5;${1}m" - c2="\033[38;5;${2}m" - c3="\033[38;5;${3}m" - c4="\033[38;5;${4}m" - c5="\033[38;5;${5}m" - c6="\033[38;5;${6}m" + c1="\033[0m\033[38;5;${1}m" + c2="\033[0m\033[38;5;${2}m" + c3="\033[0m\033[38;5;${3}m" + c4="\033[0m\033[38;5;${4}m" + c5="\033[0m\033[38;5;${5}m" + c6="\033[0m\033[38;5;${6}m" if [ "${colors[0]}" == "distro" ]; then - title_color="\033[38;5;${1}m" - at_color="\033[38;5;7m" - underline_color="\033[38;5;7m" - subtitle_color="\033[38;5;${2}m" - colon_color="\033[38;5;7m" - info_color="\033[38;5;7m" + title_color="\033[0m\033[38;5;${1}m" + at_color="\033[0m\033[38;5;7m" + underline_color="\033[0m\033[38;5;7m" + subtitle_color="\033[0m\033[38;5;${2}m" + colon_color="\033[0m\033[38;5;7m" + info_color="\033[0m\033[38;5;7m" # If the second color is white use the first for the subtitle [ "$2" == 7 ] && subtitle_color="\033[38;5;${1}m" else - title_color="\033[38;5;${colors[0]}m" - at_color="\033[38;5;${colors[1]}m" - underline_color="\033[38;5;${colors[2]}m" - subtitle_color="\033[38;5;${colors[3]}m" - colon_color="\033[38;5;${colors[4]}m" - info_color="\033[38;5;${colors[5]}m" + title_color="\033[0m\033[38;5;${colors[0]}m" + at_color="\033[0m\033[38;5;${colors[1]}m" + underline_color="\033[0m\033[38;5;${colors[2]}m" + subtitle_color="\033[0m\033[38;5;${colors[3]}m" + colon_color="\033[0m\033[38;5;${colors[4]}m" + info_color="\033[0m\033[38;5;${colors[5]}m" fi }