From 676710ca721b755a655d72084384558b6e8e7228 Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 31 Mar 2016 19:57:57 +1100 Subject: [PATCH] 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