Move some getimage blocks down so they only run in image mode
This commit is contained in:
parent
bc53d2eafe
commit
21c76cd90e
1 changed files with 17 additions and 17 deletions
34
fetch
34
fetch
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue