eww: dashboard(fake) & spotify player

This commit is contained in:
2025-06-18 13:46:51 +02:00
parent 514cbdabfc
commit 285f7a37b7
37 changed files with 1417 additions and 25 deletions

22
eww/Main/scripts/music-art Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
tmp_dir="$HOME/.config/eww/Main/images"
tmp_cover_path=$tmp_dir/cover.png
tmp_temp_path=$tmp_dir/temp.png
if [ ! -d $tmp_dir ]; then
mkdir -p $tmp_dir
fi
artlink="$(playerctl -p spotify,$any,mpd,firefox,chromium,brave metadata mpris:artUrl | sed -e 's/open.spotify.com/i.scdn.co/g')"
artFromBrowser=$(playerctl metadata mpris:artUrl | sed 's/file:\/\///g')
if [ $(playerctl -p spotify,%any,firefox,chromium,brave,mpd metadata mpris:artUrl) ]; then
curl -s "$artlink" --output $tmp_temp_path
echo $tmp_temp_path
elif [[ -n $artFromBrowser ]]; then
cp $artFromBrowser $tmp_temp_path
echo $tmp_temp_path
else
echo Main/images/default-music.svg
fi