Commit a59cf169 authored by Dylan Araps's avatar Dylan Araps

Cmus: Fix broken output, closes #389

parent fe8e15d5
......@@ -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)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment