Song: Add support for Pogo
This commit is contained in:
parent
2b44c993bb
commit
082c53e57e
1 changed files with 6 additions and 1 deletions
7
neofetch
7
neofetch
|
@ -1336,7 +1336,7 @@ get_memory() {
|
|||
|
||||
get_song() {
|
||||
# This is absurdly long.
|
||||
player="$(ps x | awk '!(/ awk|Helper|Cache|ibus|indicator/) && /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|quodlibet|deepin-music|tomahawk/ {printf $5 " " $6; exit}')"
|
||||
player="$(ps x | awk '!(/ awk|Helper|Cache|ibus|indicator/) && /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|quodlibet|deepin-music|tomahawk|pogo/ {printf $5 " " $6; exit}')"
|
||||
|
||||
get_song_dbus() {
|
||||
# Multiple players use an almost identical dbus command to get the information.
|
||||
|
@ -1416,6 +1416,11 @@ get_song() {
|
|||
awk -F'"' '/artist/ {getline; a=$2} /title/ {getline; t=$2} END{print a " - " t}')"
|
||||
;;
|
||||
|
||||
"pogo"*)
|
||||
song="$(dbus-send --print-reply --dest=org.mpris.pogo /Player org.freedesktop.MediaPlayer.GetMetadata |
|
||||
awk -F'"' '/string "artist"/ {getline; a=$2} /string "title"/ {getline; t=$2} END{print a " - " t}')"
|
||||
;;
|
||||
|
||||
*)
|
||||
mpc >/dev/null 2>&1 && song="$(mpc current)"
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue