From 92246e7b7fca9fc76d04f21e5a0809e996144b54 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sun, 29 Dec 2019 11:02:30 +0100 Subject: [PATCH] song: simplify cmus --- neofetch | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/neofetch b/neofetch index f3d098e0..68fb8c4d 100755 --- a/neofetch +++ b/neofetch @@ -2640,17 +2640,10 @@ get_song() { "cmus"*) # NOTE: cmus >= 2.8.0 supports mpris2 - song="$(cmus-remote -Q | awk 'BEGIN { ORS=" "}; - /tag artist/ { - $1=$2=""; sub(" ", ""); a=$0 - } - /tag album / { - $1=$2=""; sub(" ", ""); b=$0 - } - /tag title/ { - $1=$2=""; sub(" ", ""); t=$0 - } - END { print a " \n" b " \n" t }')" + song="$(cmus-remote -Q | awk '/tag artist/ {$1=$2=""; a=$0} + /tag album / {$1=$2=""; b=$0} + /tag title/ {$1=$2=""; t=$0} + END {print a " \n" b " \n" t}')" ;; "spotify"*)