From f7107a8ffbef1c221a6329c6909f85b9234761fb Mon Sep 17 00:00:00 2001 From: Dylan Date: Mon, 1 Feb 2016 11:05:46 +1100 Subject: [PATCH] Only get column count if we need it. --- fetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fetch b/fetch index 81258108..433e1a94 100755 --- a/fetch +++ b/fetch @@ -1573,6 +1573,9 @@ getimage () { return fi + # Get columns + columns=$(tput cols) + # Image size is half of the terminal imgsize=$((columns * font_width / split_size)) @@ -2103,9 +2106,6 @@ trap 'printf "\033[?25h"; clear; exit' 2 # If the script exits for any reason, unhide the cursor. trap 'printf "\033[?25h"' EXIT -# Get columns -columns=$(tput cols) - if [ "$image" != "off" ]; then # Hide the cursor printf "\033[?25l"