From 4619eba6546a914ba70e7e5fb71aa9382415e46a Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 21 Oct 2016 21:45:32 +1100 Subject: [PATCH] Don't do any dynamic prompt stuff in image off mode --- neofetch | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/neofetch b/neofetch index 2bb72b09..16f6ff54 100755 --- a/neofetch +++ b/neofetch @@ -2901,7 +2901,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 @@ -3299,17 +3299,17 @@ 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"