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

+20
View File
@@ -0,0 +1,20 @@
#!/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=$(echo $info | cut -c1-30)"..."
fi
tooltip=$(playerctl metadata --format "{{duration(position)}} / {{duration(mpris:length)}}")
text=$info" "$icon
elif [[ $class == "paused" ]]; then
text=$icon
elif [[ $class == "stopped" ]]; then
text=""
fi
echo -e "{\"text\":\""$text"\", \"tooltip\":\""$tooltip"\"}, \"class\":\""$class"\"}"
@@ -0,0 +1 @@
{"version":1,"resource":"file:///home/jvj/.config/waybar/modules/spotify1.sh","entries":[{"id":"XASt.sh","timestamp":1725060077444},{"id":"ofq1.sh","source":"renamed.source","sourceDescription":"~/.config/waybar/modules/spotify.sh","timestamp":1725060096800}]}
+20
View File
@@ -0,0 +1,20 @@
#!/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=$(echo $info | cut -c1-30)"..."
fi
tooltip=$(playerctl metadata --format "{{duration(position)}} / {{duration(mpris:length)}}")
text=$info" "$icon
elif [[ $class == "paused" ]]; then
text=$icon
elif [[ $class == "stopped" ]]; then
text=""
fi
echo -e "{\"text\":\""$text"\", \"tooltip\":\""$tooltip"\"}, \"class\":\""$class"\"}"