From 7d284e4bbbb05ab1ed2668889323afc149a3fbea Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Thu, 22 Dec 2016 23:44:59 +0100 Subject: [PATCH] Add support for Exaile --- neofetch | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 47e12aef..6d89618e 100755 --- a/neofetch +++ b/neofetch @@ -1187,7 +1187,7 @@ get_memory() { get_song() { # This is absurdly long. - player="$(ps x | awk '!(/awk|Helper|Cache/) && /mpd|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha/ {printf $5 " " $6; exit}')" + player="$(ps x | awk '!(/awk|Helper|Cache/) && /mpd|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile/ {printf $5 " " $6; exit}')" get_song_dbus() { # Multiple players use an almost identical dbus command to get the information. @@ -1250,6 +1250,12 @@ get_song() { title="$(pragha -c | awk -F':' '/title/ {print $2}')" song="$artist - $title" ;; + + "exaile"*) + song="$(dbus-send --print-reply --dest=org.exaile.Exaile /org/exaile/Exaile \ + org.exaile.Exaile.Query | awk -F':|,' '{printf $6 " -" $4}')" + song="${song:3}" + ;; esac # Display Artist and Title on separate lines.