diff --git a/neofetch b/neofetch index 77305e67..e6151acc 100755 --- a/neofetch +++ b/neofetch @@ -2091,6 +2091,11 @@ 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 @@ -2099,11 +2104,6 @@ getascii() { lines="$((lines+=1))" done <<< "$ascii_strip" - # Workaround for calculating length of block chars - # when locale is set to 'C' - block_char="█" - [ "${#block_char}" == 3 ] && ascii_length="$((ascii_length / 3 + 2))" - padding="\033[$((ascii_length + gap))C" printf "%b%s" "$print" export LC_ALL=C