From 26389a8423c865c97cd43d8499f340caf78c11a8 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Fri, 8 Jun 2018 13:56:45 +0200 Subject: [PATCH 1/2] song: use get_song_dbus for amarok --- neofetch | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/neofetch b/neofetch index a0059a6d..559a7b33 100755 --- a/neofetch +++ b/neofetch @@ -2370,6 +2370,7 @@ get_song() { "vlc"*) get_song_dbus "vlc" ;; "gmusicbrowser"*) get_song_dbus "gmusicbrowser" ;; "pragha"*) get_song_dbus "pragha" ;; + "amarok"*) get_song_dbus "amarok" ;; "cmus"*) song="$(cmus-remote -Q | awk 'BEGIN { ORS=" "}; @@ -2409,12 +2410,6 @@ get_song() { END {print a " \n " b " \n "t}')" ;; - "amarok"*) - song="$(qdbus org.kde.amarok /Player GetMetadata |\ - awk -F':' '/^artist:/ {a=$2} /^album:/ {b=$2} /^title:/ {t=$2} - END {print a " \n " b " \n " t}')" - ;; - "exaile"*) song="$(dbus-send --print-reply --dest=org.exaile.Exaile /org/exaile/Exaile \ org.exaile.Exaile.Query | From abe6b82fc79a5a67f33f63e4741e7d2d90b10a86 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Fri, 8 Jun 2018 14:18:56 +0200 Subject: [PATCH 2/2] song: add comment for exaile --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 559a7b33..94262606 100755 --- a/neofetch +++ b/neofetch @@ -2411,6 +2411,7 @@ get_song() { ;; "exaile"*) + # NOTE: Exaile >= 4.0.0 will support mpris2. song="$(dbus-send --print-reply --dest=org.exaile.Exaile /org/exaile/Exaile \ org.exaile.Exaile.Query | awk -F':|,' '{if ($6 && $8 && $4) printf $6 " \n" $8 " \n" $4}')"