From 79392d75a99cdd5cefc2082af9d3e4f0d87bb6a7 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 22 Oct 2016 10:15:47 +1100 Subject: [PATCH] Sigh --- neofetch | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index 128395b2..7328ae6b 100755 --- a/neofetch +++ b/neofetch @@ -2922,18 +2922,20 @@ dynamicprompt() { # If the info is higher than the ascii/image place the prompt # based on the info height instead of the ascii/image height. if [ "${lines:-0}" -lt "${info_height:-0}" ]; then - lines="0" + lines="-2" else lines="$((lines - info_height + cursor_yoffset))" fi # Set the prompt location - printf "\033[${lines/-*/0}B" + if [ "$lines" -lt 0 ]; then + printf "\033[${lines}A" + else + printf "\033[${lines}B" + fi # Add some padding - [ "$image" == "ascii" ] && \ - [ "$lines" -gt 0 ] && \ - printf "\n\n" + [ "$image" == "ascii" ] && printf "\n\n" } # }}}