From 76cc33f95f5c7856268bc5e939f499f4b32b6ba6 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 28 Aug 2016 11:41:27 +1000 Subject: [PATCH] Fix padding on android --- neofetch | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/neofetch b/neofetch index 0cc63954..4cef6725 100755 --- a/neofetch +++ b/neofetch @@ -1974,6 +1974,11 @@ getascii() { [ "${#line}" -gt "$ascii_length" ] && ascii_length="${#line}" 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))" + lines="$(printf "%s\n" "$ascii_strip" | wc -l)" padding="\033[$((ascii_length + gap))C" printf "%b%s" "$print"