From 122bfa73f7242bc0c17e9f69e0feecbcf503697a Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Thu, 25 Feb 2021 19:02:12 -0600 Subject: [PATCH] Mark imagemagick as optional dependency (allows kitty backend) --- Makefile | 1 + control.template | 1 + nekofetch | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 93f7932..bc71949 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,7 @@ install: mkdir -p $(PREFIX)/bin install -m 0755 nekofetch $(PREFIX)/bin/nekofetch @echo "You may need to install jq, jp2a, and neofetch" + @echo "imagemagick is also required to use the kitty image backend" uninstall: rm -f $(PREFIX)/bin/nekofetch diff --git a/control.template b/control.template index 9a39d71..239420c 100644 --- a/control.template +++ b/control.template @@ -2,5 +2,6 @@ Package: PACKAGE Architecture: ARCH Version: VERSION Depends: curl, jq, jp2a, neofetch +Recommends: imagemagick Description: neofetch but with nekos Maintainer: bbaovanc diff --git a/nekofetch b/nekofetch index 9b5add3..4cd3ff6 100755 --- a/nekofetch +++ b/nekofetch @@ -23,7 +23,7 @@ echo "Using height $height" url=$(curl -fsSL "$imgurl" | jq -r ".url") curl -fsSLo "$tmpfile.jpg" "$url" -if [ "$TERM" = "xterm-kitty" ]; then +if [ "$TERM" = "xterm-kitty" ] && command -v convert > /dev/null 2>&1; then neofetch --kitty "$tmpfile.jpg" else jp2a --height="$height" "$tmpfile.jpg" > "$tmpfile"