From fe8e15d5d6f5bf26dc7beb448579c080987b188e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 22 Oct 2016 20:25:41 +1100 Subject: [PATCH] Simplify cursor position --- neofetch | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/neofetch b/neofetch index 9b236b7e..5b625040 100755 --- a/neofetch +++ b/neofetch @@ -2918,10 +2918,9 @@ kdeconfigdir() { dynamicprompt() { # Calculate image height in terminal cells. - # The '+ 1' adds a gap between the prompt and the content. if [ "$image" != "ascii" ]; then - lines="$((${height:-1} / ${font_height:-1} + 3))" - cursor_yoffset="$((${yoffset:-1} / ${font_height:-1}))" + lines="$((height / font_height))" + cursor_yoffset="$((${yoffset:-1} / font_height))" else cursor_yoffset="0 - 2" fi @@ -2942,7 +2941,7 @@ dynamicprompt() { fi # Add some padding - [ "$image" == "ascii" ] && printf "\n\n" + printf "\n\n" } # }}}