From a59cf169e4ac8d26b82c30658efda42383619afb Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 22 Oct 2016 23:14:54 +1100 Subject: [PATCH] Cmus: Fix broken output, closes #389 --- neofetch | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/neofetch b/neofetch index 5b625040..132f21a5 100755 --- a/neofetch +++ b/neofetch @@ -1215,12 +1215,11 @@ getsong() { elif [ -n "$(ps x | awk '!(/awk/) && /cmus/')" ]; then IFS=$'\n' - song=("$(cmus-remote -Q | grep "tag artist \|title \|status" 2>/dev/null | sort)") + song=($(cmus-remote -Q | grep "tag artist \|tag title \|status" 2>/dev/null | sort)) + state="${song[0]/status }" artist="${song[1]/tag artist }" title="${song[2]/tag title }" - state="${song[0]/status }" - - song="$artist - $title" + song="${artist/tag title } - ${title/tag artist }" elif pgrep "mocp" >/dev/null 2>&1; then song="$(mocp -Q "%artist - %song" 2>/dev/null)"