mirror of
https://github.com/danbulant/nekofetch
synced 2026-06-19 22:31:13 +00:00
add nekofetch script
This commit is contained in:
parent
8128d412da
commit
c7da73112e
1 changed files with 32 additions and 0 deletions
32
nekofetch
Normal file
32
nekofetch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ ! command -v jp2a &> /dev/null ]; then
|
||||
echo "jp2a not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! command -v neofetch &> /dev/null ]; then
|
||||
echo "neofetch not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! command -v jq &> /dev/null ]; then
|
||||
echo "jq not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[[ ! -d "/tmp/nekofetch" ]] && mkdir /tmp/nekofetch
|
||||
|
||||
if [[ "$1" = "--nsfw" ]]; then
|
||||
url=$(curl "https://nekos.life/api/v2/img/cum_jpg" | jq -r ".url")
|
||||
curl -fsSLo "/tmp/nekofetch/neko.jpg" "$url"
|
||||
|
||||
jp2a /tmp/nekofetch/neko.jpg > /tmp/nekofetch/neko
|
||||
neofetch --source /tmp/nekofetch/neko
|
||||
else
|
||||
url=$(curl "https://nekos.life/api/v2/img/neko" | jq -r ".url")
|
||||
curl -fsSLo "/tmp/nekofetch/neko.jpg" "$url"
|
||||
|
||||
jp2a /tmp/nekofetch/neko.jpg > /tmp/nekofetch/neko
|
||||
neofetch --source /tmp/nekofetch/neko
|
||||
fi
|
||||
Loading…
Reference in a new issue