diff --git a/fetch b/fetch index 20565e8c..a848773e 100755 --- a/fetch +++ b/fetch @@ -1098,16 +1098,16 @@ getmemory () { # Song {{{ getsong () { - if type -p mpc >/dev/null 2>&1; then + if pgrep "mpd" >/dev/null 2>&1; then song="$(mpc current)" - elif type -p cmus >/dev/null 2>&1; then + elif pgrep "cmus" >/dev/null 2>&1; then song="$(cmus-remote -Q | grep "tag artist\|title")" song=${song/tag artist } song=${song/tag title/-} song=${song//[[:space:]]/ } - elif type -p mocp >/dev/null 2>&1; then + elif pgrep "mocp" >/dev/null 2>&1; then song="$(mocp -Q "%artist - %song")" else