Add cmus support for OS X

This commit is contained in:
Dylan 2016-04-02 01:39:20 +11:00
parent eb07ceb563
commit 12ea7591dc

View file

@ -1261,7 +1261,7 @@ getsong () {
song="$(mpc current 2>/dev/null)"
state=$(mpc | awk -F '\\[|\\]' '/\[/ {printf $2}' 2>/dev/null)
elif pgrep "cmus" >/dev/null 2>&1; then
elif [ -n "$(ps x | awk '!(/awk/) && /cmus/')" ]; then
song="$(cmus-remote -Q | grep "tag artist\|title" 2>/dev/null)"
song=${song/tag artist }
song=${song/tag title/-}