diff --git a/nekofetch b/nekofetch index 4cd3ff6..725b893 100755 --- a/nekofetch +++ b/nekofetch @@ -23,11 +23,17 @@ echo "Using height $height" url=$(curl -fsSL "$imgurl" | jq -r ".url") curl -fsSLo "$tmpfile.jpg" "$url" -if [ "$TERM" = "xterm-kitty" ] && command -v convert > /dev/null 2>&1; then - neofetch --kitty "$tmpfile.jpg" +if [ "$TERM" = "xterm-kitty" ]; then + command -v convert > /dev/null 2>&1 && neofetch --kitty "$tmpfile.jpg" || kitty_imagemagick_warn=true + if [ "$kitty_imagemagick_warn" = "true" ]; then + jp2a --height="$height" "$tmpfile.jpg" > "$tmpfile" + neofetch --source "$tmpfile" + fi else jp2a --height="$height" "$tmpfile.jpg" > "$tmpfile" neofetch --source "$tmpfile" fi rm "$tmpfile" "$tmpfile.jpg" + +[ "$kitty_imagemagick_warn" = "true" ] && echo "WARN: imagemagick is required for kitty image backend"