rice/scripts/get-player-title

11 lines
283 B
Plaintext
Raw Permalink Normal View History

2021-07-28 23:44:53 -07:00
#!/usr/bin/env bash
STAT=`playerctl status 2>/dev/null`
if [[ $STAT == "" ]]; then
printf "\n"
elif [[ $(playerctl status 2>/dev/null) == "Playing" ]]; then
printf "%s\n" "Playing: $(playerctl metadata title)"
else
printf "%s\n" "Paused: $(playerctl metadata title)"
fi