From 21201a1abd647a13ce7b6614e975ad75893cea75 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 24 Nov 2016 22:01:28 +0700 Subject: [PATCH 1/3] Music: Added support for Clementine --- neofetch | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 555bbcd8..c7b7cc41 100755 --- a/neofetch +++ b/neofetch @@ -1081,7 +1081,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|gnome-music|lollypop/ {printf $5 " " $6; exit}')" + player="$(ps x | awk '!(/awk|Helper|Cache/) && /mpd|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|gnome-music|lollypop|clementine/ {printf $5 " " $6; exit}')" case "${player/*\/}" in "mpd"*) @@ -1187,6 +1187,17 @@ get_song() { song="${song% - }" ;; + "clementine"*) + # dbus + song="$( + dbus-send --print-reply --dest=org.mpris.clementine /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 " - "}' + )" + song="${song% - }" + ;; + *) song="Not Playing" ;; esac From 7527f2c459040b80481cf16c572ea2a35d96cba4 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 24 Nov 2016 22:08:52 +0700 Subject: [PATCH 2/3] Music: Added support for Pragha --- neofetch | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index c7b7cc41..4db4225c 100755 --- a/neofetch +++ b/neofetch @@ -1081,7 +1081,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|gnome-music|lollypop|clementine/ {printf $5 " " $6; exit}')" + player="$(ps x | awk '!(/awk|Helper|Cache/) && /mpd|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|gnome-music|lollypop|clementine|pragha/ {printf $5 " " $6; exit}')" case "${player/*\/}" in "mpd"*) @@ -1198,6 +1198,12 @@ get_song() { song="${song% - }" ;; + "pragha"*) + artist="$(pragha -c | awk -F':' '/artist/ {print $2}')" + title="$(pragha -c | awk -F':' '/title/ {print $2}')" + song="$artist - $title" + ;; + *) song="Not Playing" ;; esac From 1217426ba56e76d6978320320c43aad83b31c566 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 25 Nov 2016 09:56:39 +1100 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50569078..8ec5bcc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -106,8 +106,10 @@ **Song**
+- Added support for Clementine. **[@konimex](https://github.com/konimex)** - Added support for GNOME Music. **[@konimex](https://github.com/konimex)** - Added support for Lollypop. **[@konimex](https://github.com/konimex)** +- Added support for Pragha. **[@konimex](https://github.com/konimex)** **Public IP**