mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-22 11:39:53 +00:00
Move some getimage blocks down so they only run in image mode
This commit is contained in:
34
fetch
34
fetch
@@ -1548,23 +1548,7 @@ getimage () {
|
|||||||
image="ascii"
|
image="ascii"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Image size is half of the terminal
|
# Call function based on $image
|
||||||
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.
|
|
||||||
case "$image" in
|
case "$image" in
|
||||||
"wall")
|
"wall")
|
||||||
getwallpaper
|
getwallpaper
|
||||||
@@ -1593,6 +1577,22 @@ getimage () {
|
|||||||
return
|
return
|
||||||
fi
|
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 equals terminal height
|
||||||
lines=$(tput lines)
|
lines=$(tput lines)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user