diff --git a/neofetch b/neofetch index 99b0e665..f133a273 100755 --- a/neofetch +++ b/neofetch @@ -1120,6 +1120,7 @@ getmemory() { # Song {{{ getsong() { + # This is absurdly long. player="$(ps x | awk '!(/awk|Helper|Cache/) && /mpd|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious/ {printf $5 " " $6; exit}')" case "${player/*\/}" in @@ -1176,7 +1177,7 @@ getsong() { "rhythmbox"*) song="$(rhythmbox-client --print-playing)" - # Well, what can you expect? It's dbus after all. + # Thanks dbus state="$(dbus-send --print-reply --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 \ org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string: 'PlayBackStatus' |\ awk -F 'string "' '{printf $2}')"