From 130b7028ef6d58cad2018720979533a234dda845 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 24 May 2018 15:33:13 +1000 Subject: [PATCH 1/2] song: Fix matching --- neofetch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index bd09a0b7..00df4b66 100755 --- a/neofetch +++ b/neofetch @@ -2313,7 +2313,7 @@ get_memory() { } get_song() { - player="$(ps -e | grep -m 1 -o \ + player="$(ps -e | grep -m 1 \ -e "Google Play" \ -e "Spotify" \ -e "amarok" \ @@ -2345,6 +2345,8 @@ get_song() { -e "yarock" \ -e "sayonara" \ -e "vlc")" + player="${player/* }" + player="${player##*/}" [[ "$music_player" && "$music_player" != "auto" ]] && \ player="$music_player" From 33d6dd760f79c5ebfff06c42b0e0c88c1ec6c17f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 24 May 2018 15:36:04 +1000 Subject: [PATCH 2/2] song: Fix matching --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 00df4b66..e71746e1 100755 --- a/neofetch +++ b/neofetch @@ -2313,7 +2313,7 @@ get_memory() { } get_song() { - player="$(ps -e | grep -m 1 \ + player="$(ps -e | grep -m 1 -F \ -e "Google Play" \ -e "Spotify" \ -e "amarok" \ @@ -2328,7 +2328,7 @@ get_song() { -e "exaile" \ -e "gnome-music" \ -e "guayadeque" \ - -e "iTunes$" \ + -e "iTunes" \ -e "juk" \ -e "lollypop" \ -e "mocp" \