hyprland-arch/waybar/scripts/spotify

12 lines
601 B
Text
Raw Permalink Normal View History

2024-02-05 22:40:28 +01:00
#!/usr/bin/env bash
player_status=$(playerctl status 2> /dev/null)
if [ "$player_status" = "Playing" ]; then
echo -e " $(playerctl metadata --format '{{markup_escape(title)}}')\nPlaying: $(playerctl metadata --format '{{markup_escape(artist)}}') - $(playerctl metadata --format '{{markup_escape(title)}}')\nplaying"
elif [ "$player_status" = "Paused" ]; then
echo -e " $(playerctl metadata --format '{{markup_escape(title)}}')\nPaused: $(playerctl metadata --format '{{markup_escape(artist)}}') - $(playerctl metadata --format '{{markup_escape(title)}}')\npaused"
else
echo -e ""
fi