This commit is contained in:
Le_Foucheur committed 2024-09-15 22:10:50 +02:00
1 parent bd49911eca
commit e3de01bde8
3742 files changed
+64316

No files matched your search

-25
View File
@@ -1,25 +0,0 @@
#!/bin/sh
class=$(playerctl metadata --player=Deezer --format '{{lc(status)}}')
icon=""
if [[ $class == "playing" ]]; then
info=$(playerctl metadata --player=Deezer --format '{{title}} - {{artist}}')
info=$(echo ${info//\"/\\\"}) # Escape quote with \"
if [[ ${#info} -ge 33 ]]; then
info=$(playerctl metadata --player=Deezer --format '{{title}}')
info=$(echo ${info//\"/\\\"}) # Escape quote with \"
fi
if [[ ${#info} -ge 33 ]]; then
info=$(echo $info | cut -c1-30)"..."
fi
tooltip=$(playerctl metadata --format "{{duration(position)}}/{{duration(mpris:length)}}")
text=$info" "$icon
tooltip="🜁 "$tooltip" 🜃"
elif [[ $class == "paused" ]]; then
text="󰏤 "$icon
elif [[ $class == "stopped" ]]; then
text=""
fi
echo -e "{\"text\":\""$text"\", \"tooltip\":\""$tooltip"\"}, \"class\":\""$class"\"}"