diff --git a/fetch b/fetch index ad1f085f..40a7b500 100755 --- a/fetch +++ b/fetch @@ -1519,11 +1519,17 @@ getimage () { esac # If $img is empty, reset padding to 0 and exit the function - if [ -z "$img" ]; then - padding="\033[0C" + if [ ! -f "$img" ]; then + # Fallback to ascii mode + image="ascii" + getascii + return fi + # Lines equals terminal height + lines=$(tput lines) + # Check to see if the image has a file extension case "${img##*/}" in *"."*) @@ -1590,9 +1596,6 @@ getimage () { esac fi - # Lines equals terminal height - lines=$(tput lines) - # The final image img="$imgtempdir/$imgname" }