Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Specifying the icon(s) in the script
- # This allows us to change its appearance conditionally
- icon=""
- player_status=$(playerctl status 2> /dev/null)
- if [[ $? -eq 0 ]]; then
- metadata="$(playerctl metadata artist) - $(playerctl metadata title)"
- fi
- # Foreground color formatting tags are optional
- if [[ $player_status = "Playing" ]]; then
- echo "%{F#bfaaff77}$icon $metadata" # Orange when playing
- elif [[ $player_status = "Paused" ]]; then
- echo "%{F#65737E}$icon $metadata" # Greyed out info when paused
- else
- echo "%{F#65737E}$icon" # Greyed out icon when stopped
- fi
Advertisement
Add Comment
Please, Sign In to add comment