Merge pull request #167 from dawidd6/master

fix for mpc detection
This commit is contained in:
Dylan Araps 2016-03-25 10:03:27 +11:00
commit 769a2cddb6

View file

@ -1192,7 +1192,7 @@ getmemory () {
# Song {{{
getsong () {
if pgrep "mpd" >/dev/null 2>&1; then
if mpc version >/dev/null 2>&1; then
song="$(mpc current 2>/dev/null)"
state=$(mpc | awk -F '\\[|\\]' '/\[/ {printf $2}' 2>/dev/null)