From 732389ffe0ca6bd64a3d29fe0a63986214ab42a9 Mon Sep 17 00:00:00 2001 From: "Azalea (on HyDEV-Daisy)" Date: Sun, 10 Apr 2022 05:12:02 -0400 Subject: [PATCH] [+] ! IMPORTANT ! - Patch neofetch --- neofetch | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index 48b96d21..629ca1ac 100755 --- a/neofetch +++ b/neofetch @@ -4067,11 +4067,16 @@ print_ascii() { LC_ALL="$sys_locale" # Calculate size of ascii file in line length / line count. - while IFS=$'\n' read -r line; do - line=${line//\\\\/\\} - line=${line//█/ } - ((++lines,${#line}>ascii_len)) && ascii_len="${#line}" - done <<< "${ascii_data//\$\{??\}}" + if [ -n "$ascii_len" ] && [ -n "$ascii_lines" ] + then + lines=$ascii_lines + else + while IFS=$'\n' read -r line; do + line=${line//\\\\/\\} + line=${line//█/ } + ((++lines,${#line}>ascii_len)) && ascii_len="${#line}" + done <<< "${ascii_data//\$\{??\}}" + fi # Fallback if file not found. ((lines==1)) && { @@ -11589,4 +11594,13 @@ main() { return 0 } +get_print_ascii() { + cache_uname + get_os + get_distro + get_bold + get_distro_ascii + echo "$ascii_data" +} + main "$@"