From 676710ca721b755a655d72084384558b6e8e7228 Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 31 Mar 2016 19:57:57 +1100 Subject: [PATCH 1/4] Fix color blocks in Travis and older terminal emulators' --- neofetch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index ede5f7e5..dba1534f 100755 --- a/neofetch +++ b/neofetch @@ -1726,12 +1726,12 @@ getcols () { if [ "$color_blocks" == "on" ]; then printf "${padding}%s" while [ $start -le $end ]; do - printf "\033[48;5;${start}m%${block_width}s" + case "$start" in + [0-6]) printf "\033[4${start}m%${block_width}s" ;; + 7) printf "\033[48;5;${start}m%${block_width}s\n${clear}${padding}" ;; + *) printf "\033[48;5;${start}m%${block_width}s" ;; + esac start=$((start + 1)) - - # Split the blocks at 8 colors - [ $end -ge 9 ] && [ $start -eq 8 ] && \ - printf "\n%s${clear}${padding}" done # Clear formatting From 77be9540744857a3a4a3940537b3af4cf8fca47b Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 31 Mar 2016 20:01:53 +1100 Subject: [PATCH 2/4] Travis print color blocks --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 80f562cf..0be80158 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,4 @@ before_install: script: - sudo make install - - time neofetch --test --ascii --color_blocks off --config off --ascii_distro travis + - time neofetch --test --ascii --config off --ascii_distro travis From a9d92d3def1c40f33587723e90d560cb07db50b6 Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 31 Mar 2016 20:05:36 +1100 Subject: [PATCH 3/4] Travis also print 7 --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index dba1534f..d0fb8d65 100755 --- a/neofetch +++ b/neofetch @@ -1728,7 +1728,7 @@ getcols () { while [ $start -le $end ]; do case "$start" in [0-6]) printf "\033[4${start}m%${block_width}s" ;; - 7) printf "\033[48;5;${start}m%${block_width}s\n${clear}${padding}" ;; + 7) printf "\033[4${start}m%${block_width}s\n${clear}${padding}" ;; *) printf "\033[48;5;${start}m%${block_width}s" ;; esac start=$((start + 1)) From 19e0dc97ebe041ef96ace5a53d07e5cafdf5356b Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 31 Mar 2016 20:10:18 +1100 Subject: [PATCH 4/4] Changelog --- 1.6.md | 1 + 1 file changed, 1 insertion(+) diff --git a/1.6.md b/1.6.md index f7dbdb61..4ac7857d 100644 --- a/1.6.md +++ b/1.6.md @@ -39,6 +39,7 @@ long period of time like the CPU/GPU. \[1\] - The default text colors now work on bright colorschemes. We no longer force
the color white, it's now based on your foreground color. - Progress bars are now by default colored based on your distro's logo colors. +- Color blocks now work in older systems and Travis. ### Packages