mirror of
https://github.com/danbulant/nekofetch
synced 2026-06-19 14:21:15 +00:00
Merge branch 'master' of https://github.com/proprdev/nekofetch
This commit is contained in:
commit
f679e105a3
3 changed files with 9 additions and 1 deletions
1
Makefile
1
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
|
||||
|
|
|
|||
|
|
@ -2,5 +2,6 @@ Package: PACKAGE
|
|||
Architecture: ARCH
|
||||
Version: VERSION
|
||||
Depends: curl, jq, jp2a, neofetch
|
||||
Recommends: imagemagick
|
||||
Description: neofetch but with nekos
|
||||
Maintainer: bbaovanc <bbaovanc@bbaovanc.com>
|
||||
|
|
|
|||
|
|
@ -34,10 +34,16 @@ url=$(curl -fsSL "$imgurl" | jq -r ".url")
|
|||
|
||||
curl -fsSLo "$tmpfile.jpg" "$url"
|
||||
if [ "$TERM" = "xterm-kitty" ]; then
|
||||
neofetch --kitty "$tmpfile.jpg"
|
||||
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