commit to fortunahub
This commit is contained in:
19
config/hypr out of date/scripts/art.sh
Executable file
19
config/hypr out of date/scripts/art.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/bash
|
||||
url=$(playerctl metadata mpris:artUrl)
|
||||
artist=$(playerctl metadata xesam:artist)
|
||||
title=$(playerctl metadata xesam:title)
|
||||
metadata=$(printf "$artist - $title")
|
||||
|
||||
if [ $url == "No player found" ]
|
||||
then
|
||||
exit
|
||||
elif [ -f /home/tdm/.cache/albumart/"$metadata".png ]
|
||||
then
|
||||
echo /home/tdm/.cache/albumart/"$metadata".png
|
||||
else
|
||||
curl -s $url -o /home/tdm/.cache/albumart/"$metadata"
|
||||
magick /home/tdm/.cache/albumart/"$metadata" /home/tdm/.cache/albumart/"$metadata".png
|
||||
rm /home/tdm/.cache/albumart/"$metadata"
|
||||
echo /home/tdm/.cache/albumart/"$metadata".png
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user