mirror of
https://github.com/danbulant/nekofetch
synced 2026-06-15 12:21:03 +00:00
Add warning message for kitty image backend for missing imagemagick
This commit is contained in:
parent
122bfa73f7
commit
9ed99828f8
1 changed files with 8 additions and 2 deletions
10
nekofetch
10
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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue