added mopidy compatibility for the Song info
This commit is contained in:
parent
3d36174e02
commit
203f218cc7
3
neofetch
3
neofetch
|
@ -1202,7 +1202,7 @@ get_memory() {
|
||||||
|
|
||||||
get_song() {
|
get_song() {
|
||||||
# This is absurdly long.
|
# 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() {
|
get_song_dbus() {
|
||||||
# Multiple players use an almost identical dbus command to get the information.
|
# Multiple players use an almost identical dbus command to get the information.
|
||||||
|
@ -1216,6 +1216,7 @@ get_song() {
|
||||||
}
|
}
|
||||||
|
|
||||||
case "${player/*\/}" in
|
case "${player/*\/}" in
|
||||||
|
"mopidy"*) song="$(mpc current)" ;;
|
||||||
"mpd"*) song="$(mpc current)" ;;
|
"mpd"*) song="$(mpc current)" ;;
|
||||||
"mocp"*) song="$(mocp -Q "%artist - %song")" ;;
|
"mocp"*) song="$(mocp -Q "%artist - %song")" ;;
|
||||||
"google play"*) song="$(gpmdp-remote current)" ;;
|
"google play"*) song="$(gpmdp-remote current)" ;;
|
||||||
|
|
Reference in New Issue