diff options
Diffstat (limited to 'scripts/mprish.sh')
-rw-r--r-- | scripts/mprish.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/mprish.sh b/scripts/mprish.sh new file mode 100644 index 0000000..54b78ca --- /dev/null +++ b/scripts/mprish.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Specifying the icon(s) in the script +# This allows us to change its appearance conditionally + +player_status=$(playerctl status 2> /dev/null) +if [[ $player_status == "Playing" || $player_status == "Paused" ]]; then + metadata="$(playerctl metadata artist) - $(playerctl metadata title)" +fi + +# Foreground color formatting tags are optional +if [[ $player_status == "Playing" ]]; then + # Orange when playing + echo "$metadata" +elif [[ $player_status == "Paused" ]]; then + # Greyed out info when paused + echo "$metadata" +else + # Greyed out icon when stopped + echo "" +fi |