Move some getimage blocks down so they only run in image mode

This commit is contained in:
Dylan 2016-02-01 08:53:00 +11:00
parent bc53d2eafe
commit 21c76cd90e

34
fetch
View file

@ -1548,23 +1548,7 @@ getimage () {
image="ascii"
fi
# Image size is half of the terminal
imgsize=$((columns * font_width / split_size))
# Where to draw the image
case "$image_position" in
"left")
# Padding is half the terminal width + gap
padding="\033[$((columns / split_size + gap))C"
;;
"right")
padding="\033[0C"
xoffset=$((columns * font_width / split_size - gap))
;;
esac
# If wall=on, Get image to display from current wallpaper.
# Call function based on $image
case "$image" in
"wall")
getwallpaper
@ -1593,6 +1577,22 @@ getimage () {
return
fi
# Image size is half of the terminal
imgsize=$((columns * font_width / split_size))
# Where to draw the image
case "$image_position" in
"left")
# Padding is half the terminal width + gap
padding="\033[$((columns / split_size + gap))C"
;;
"right")
padding="\033[0C"
xoffset=$((columns * font_width / split_size - gap))
;;
esac
# Lines equals terminal height
lines=$(tput lines)