diff --git a/neofetch b/neofetch index e6151acc..1a0df36d 100755 --- a/neofetch +++ b/neofetch @@ -2091,19 +2091,16 @@ getascii() { ascii_strip="${ascii_strip//'\\'/ }" ascii_strip="${ascii_strip//'\'}" - # Workaround for calculating length of block chars - # when locale is set to 'C' - block_char="█" - [ "${#block_char}" == 3 ] && ascii_strip="${ascii_strip//${block_char}/ }" - # Get lines/columns of the ascii file. - ascii_length=0 lines=1 while IFS='\n' read -r line 2>/dev/null; do - [ "${#line}" -gt "$ascii_length" ] && ascii_length="${#line}" + [ "${#line}" -gt "${ascii_length:-0}" ] && ascii_length="${#line}" lines="$((lines+=1))" done <<< "$ascii_strip" + # Overwrite padding if ascii_length_force is set. + [ "$ascii_length_force" ] && ascii_length="$ascii_length_force" + padding="\033[$((ascii_length + gap))C" printf "%b%s" "$print" export LC_ALL=C @@ -2595,10 +2592,15 @@ colors() { ascii_distro="mint" ;; - "LMDE"* | "Chapeau"* | "Bitrig"* | "Android"*) + "LMDE"* | "Chapeau"* | "Bitrig"*) setcolors 2 7 ;; + "Android"*) + setcolors 2 7 + ascii_length_force="19" + ;; + "NetBSD"* | "Parabola"* | "Tails"* | "BLAG"*) setcolors 5 7 ;;