From 203f218cc7a66d3915d0f9fc4b5cf6da4ade759e Mon Sep 17 00:00:00 2001 From: d3rrial Date: Sat, 7 Jan 2017 21:31:52 +0100 Subject: [PATCH 1/3] added mopidy compatibility for the Song info --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 11f5d252..7912f9b8 100755 --- a/neofetch +++ b/neofetch @@ -1202,7 +1202,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|exaile|juk|bluemindo|guayadeque|yarock|qmmp/ {printf $5 " " $6; exit}')" + player="$(ps x | awk '!(/awk|Helper|Cache/) && /mpd|mopidy|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp/ {printf $5 " " $6; exit}')" get_song_dbus() { # Multiple players use an almost identical dbus command to get the information. @@ -1216,6 +1216,7 @@ get_song() { } case "${player/*\/}" in + "mopidy"*) song="$(mpc current)" ;; "mpd"*) song="$(mpc current)" ;; "mocp"*) song="$(mocp -Q "%artist - %song")" ;; "google play"*) song="$(gpmdp-remote current)" ;; From 803f48e03259aed1fee00bda0e77a7ce72efdda1 Mon Sep 17 00:00:00 2001 From: d3rrial Date: Sat, 7 Jan 2017 21:48:29 +0100 Subject: [PATCH 2/3] made Song case switch smaller --- neofetch | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 7912f9b8..b34655ab 100755 --- a/neofetch +++ b/neofetch @@ -1216,8 +1216,7 @@ get_song() { } case "${player/*\/}" in - "mopidy"*) song="$(mpc current)" ;; - "mpd"*) song="$(mpc current)" ;; + "mpd"* | "mopidy"*) song="$(mpc current)" ;; "mocp"*) song="$(mocp -Q "%artist - %song")" ;; "google play"*) song="$(gpmdp-remote current)" ;; "rhythmbox"*) song="$(rhythmbox-client --print-playing)" ;; From 89fb0bb4ebbc732a6680702833190e9b20e71dcd Mon Sep 17 00:00:00 2001 From: d3rrial Date: Sat, 7 Jan 2017 21:53:04 +0100 Subject: [PATCH 3/3] removed spacing --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index b34655ab..a38f96d0 100755 --- a/neofetch +++ b/neofetch @@ -1216,7 +1216,7 @@ get_song() { } case "${player/*\/}" in - "mpd"* | "mopidy"*) song="$(mpc current)" ;; + "mpd"* | "mopidy"*) song="$(mpc current)" ;; "mocp"*) song="$(mocp -Q "%artist - %song")" ;; "google play"*) song="$(gpmdp-remote current)" ;; "rhythmbox"*) song="$(rhythmbox-client --print-playing)" ;;