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 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 diff --git a/neofetch b/neofetch index ede5f7e5..d0fb8d65 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[4${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