From 6e47608bc5fc0292158eeab28e02510755005c74 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 21 Oct 2016 18:09:25 +1100 Subject: [PATCH] Don't do any dynamic prompt stuff in image off mode --- neofetch | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/neofetch b/neofetch index 1a0df36d..bbaa5986 100755 --- a/neofetch +++ b/neofetch @@ -2923,7 +2923,7 @@ kdeconfigdir() { dynamicprompt() { # Calculate image height in terminal cells. # The '+ 4' adds a gap between the prompt and the content. - [ "$image" != "ascii" ] && [ "$image" != "off" ] && \ + [ "$image" != "ascii" ] && \ lines="$((${height:-1} / ${font_height:-1} + 4))" # If the info is higher than the ascii/image place the prompt @@ -3319,17 +3319,18 @@ main() { # Display the image if enabled displayimage + + # Set cursor position next to ascii art + printf "\033[$((${lines:-4} - ${prompt_loc:-4}))A" + + # Reset horizontal cursor position + printf "\033[9999999D" fi - # Set cursor position next to ascii art - printf "\033[$((${lines:-4} - ${prompt_loc:-4}))A" - - # Reset horizontal cursor position - printf "\033[9999999D" - # Print the info printinfo - dynamicprompt + + [ "$image" != "off" ] && dynamicprompt # Re-enable line wrap printf "%b%s" "\033[?7h"