From ce3567b2f6743011fb3cc4c0cfa71ff8bd8cc720 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 24 Apr 2016 11:10:57 +1000 Subject: [PATCH] --colors use color 7 instead of foreground. Adds 'fg' as new value for colors --- config/config | 2 ++ neofetch | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/config/config b/config/config index 8eb6012d..63c17adf 100644 --- a/config/config +++ b/config/config @@ -211,6 +211,8 @@ block_width=3 # the text in this order: # title, @, underline, subtitle, colon, info # colors=(4 6 1 8 8 6) +# You can also specify: +# fg (foreground color) colors=(distro) diff --git a/neofetch b/neofetch index f91b2df0..0f7fdb76 100755 --- a/neofetch +++ b/neofetch @@ -236,6 +236,8 @@ block_width=3 # the text in this order: # title, @, underline, subtitle, colon, info # colors=(4 6 1 8 8 6) +# You can also specify: +# fg (foreground color) colors=(distro) @@ -2420,7 +2422,7 @@ setcolors () { fi if [ "$progress_color_elapsed" == "distro" ]; then - progress_color_elapsed="$(color 7)" + progress_color_elapsed="$(color fg)" else progress_color_elapsed="$(color $progress_color_elapsed)" fi @@ -2434,8 +2436,8 @@ setcolors () { color () { case "$1" in - [0-6]) printf "%b%s" "\033[0m\033[3${1}m" ;; - 7) printf "%b%s" "\033[0m" ;; + [0-7]) printf "%b%s" "\033[0m\033[3${1}m" ;; + "fg") printf "%b%s" "\033[0m" ;; *) printf "%b%s" "\033[38;5;${1}m" ;; esac }