From e9132ca2cc00c3e1d4e29691f6374c40f9ea9d55 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 24 Dec 2016 10:32:06 +0100 Subject: [PATCH] Song: enforce order artist - title in get_song_dbus() --- neofetch | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 3ae1e775..bfc02683 100755 --- a/neofetch +++ b/neofetch @@ -1200,9 +1200,8 @@ get_song() { dbus-send --print-reply --dest=org.mpris.MediaPlayer2."${1}" /org/mpris/MediaPlayer2 \ org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' |\ awk -F 'string "' '/string|array/ {printf "%s",$2; next}{print ""}' |\ - awk -F '"' '/artist|title/ {printf $2 " - "}' + awk -F '"' '/artist/ {a=$2} /title/ {t=$2} END{print a " - " t}' )" - song="${song% - }" } case "${player/*\/}" in