From d6505023a9ae0f4b48acc4858d26b020778de29e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 4 Jun 2018 10:46:47 +1000 Subject: [PATCH] cursor: simplify statement --- neofetch | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/neofetch b/neofetch index 2d258637..28c944e7 100755 --- a/neofetch +++ b/neofetch @@ -4122,15 +4122,11 @@ kde_config_dir() { } dynamic_prompt() { - [[ "$image_backend" == "off" ]] && { printf '\n'; return; } + [[ "$image_backend" == "off" ]] && { printf '\n'; return; } [[ "$image_backend" != "ascii" ]] && lines="$(((height + yoffset) / font_height + 1))" # If the ascii art is taller than the info. - if ((lines > info_height)); then - lines="$((lines - info_height + 1))" - else - lines=1 - fi + ((lines=lines>info_height?lines-info_height+1:1)) printf -v nlines "%${lines}s" printf "%b" "${nlines// /\\n}"