From d75ce880d41e64907255a0f2dccc05fe1a68f937 Mon Sep 17 00:00:00 2001 From: dawidd6 Date: Sun, 20 Mar 2016 12:02:55 +0100 Subject: [PATCH 1/2] fix for mpc detection --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index cfaea51b..9ecad5f5 100755 --- a/neofetch +++ b/neofetch @@ -1192,7 +1192,7 @@ getmemory () { # Song {{{ getsong () { - if pgrep "mpd" >/dev/null 2>&1; then + if hash "mpc" >/dev/null 2>&1; then song="$(mpc current 2>/dev/null)" state=$(mpc | awk -F '\\[|\\]' '/\[/ {printf $2}' 2>/dev/null) From 7aa3bd8fea9547cb124f61013e27377bec5ab86d Mon Sep 17 00:00:00 2001 From: Dawid Date: Thu, 24 Mar 2016 19:31:10 +0100 Subject: [PATCH 2/2] changed mpc according to @dylanaraps suggestion --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 9ecad5f5..93a36af0 100755 --- a/neofetch +++ b/neofetch @@ -1192,7 +1192,7 @@ getmemory () { # Song {{{ getsong () { - if hash "mpc" >/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)