Files
neoromantique-dotfiles/scripts/moc_status.sh
David Aizenberg 74bbc988c8 update
2019-07-15 11:38:55 +03:00

23 lines
391 B
Bash
Executable File

#!/bin/sh
STATE=$(mocp --format "%state")
MOC="$(mocp --format="%t - %a (%ct/%tt)")"
case $STATE in
"PLAY")
COLOR='#00AA00'
STATUS="▶"
;;
"PAUSE")
COLOR='#AAAA00'
STATUS="⏸"
;;
*)
MOC="Not playing"
COLOR='#AA0000'
STATUS=""
;;
esac
echo "${STATUS} ${MOC}"
echo "${STATUS} ${MOC}"
echo "$COLOR"