commit
da37135ef0
1 changed files with 19 additions and 30 deletions
27
neofetch
27
neofetch
|
@ -2332,7 +2332,7 @@ get_song() {
|
|||
"deadbeef"
|
||||
"deepin-music"
|
||||
"dragon"
|
||||
"elise"
|
||||
"elisa"
|
||||
"exaile"
|
||||
"gnome-music"
|
||||
"gmusicbrowser"
|
||||
|
@ -2373,8 +2373,8 @@ get_song() {
|
|||
dbus-send --print-reply --dest=org.mpris.MediaPlayer2."${1}" /org/mpris/MediaPlayer2 \
|
||||
org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' \
|
||||
string:'Metadata' |\
|
||||
awk -F '"' 'BEGIN {RS=" entry"}; /xesam:artist/ {a = $4} /xesam:album/ {b = $4}
|
||||
/xesam:title/ {t = $4} END {print a " \n " b " \n " t}'
|
||||
awk -F '"' 'BEGIN {RS=" entry"}; /"xesam:artist"/ {a = $4} /"xesam:album"/ {b = $4}
|
||||
/"xesam:title"/ {t = $4} END {print a "\n" b "\n" t}'
|
||||
)"
|
||||
}
|
||||
|
||||
|
@ -2382,7 +2382,6 @@ get_song() {
|
|||
"mpd"*|"mopidy"*) song="$(mpc -f '%artist%\n%album%\n%title%' current "${mpc_args[@]}")" ;;
|
||||
"mocp"*) song="$(mocp -Q '%artist\n%album\n%song')" ;;
|
||||
"google play"*) song="$(gpmdp-remote current)" ;;
|
||||
"rhythmbox"*) song="$(rhythmbox-client --print-playing-format '%ta \n %at \n %tt')" ;;
|
||||
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist%\n%album%\n%title%')" ;;
|
||||
"xmms2d"*) song="$(xmms2 current -f "\${artist}"$'\n'"\${album}"$'\n'"\${title}")" ;;
|
||||
"qmmp"*) song="$(qmmp --nowplaying '%p\n%a\n%t')" ;;
|
||||
|
@ -2404,6 +2403,7 @@ get_song() {
|
|||
"amarok"*) get_song_dbus "amarok" ;;
|
||||
"dragon"*) get_song_dbus "dragonplayer" ;;
|
||||
"smplayer"*) get_song_dbus "smplayer" ;;
|
||||
"rhythmbox"*) get_song_dbus "rhythmbox" ;;
|
||||
|
||||
"cmus"*)
|
||||
song="$(cmus-remote -Q | awk 'BEGIN { ORS=" "};
|
||||
|
@ -2453,26 +2453,15 @@ get_song() {
|
|||
"quodlibet"*)
|
||||
song="$(dbus-send --print-reply --dest=net.sacredchao.QuodLibet \
|
||||
/net/sacredchao/QuodLibet net.sacredchao.QuodLibet.CurrentSong |\
|
||||
awk -F'"' '/artist/ {getline; a=$2} /album/ {getline; b=$2}
|
||||
/title/ {getline; t=$2} END {print a " \n " b " \n " t}')"
|
||||
awk -F'"' 'BEGIN {RS=" entry"}; /"artist"/ {a=$4} /"album"/ {b=$4}
|
||||
/"title"/ {t=$4} END {print a "\n" b "\n" t}')"
|
||||
;;
|
||||
|
||||
"pogo"*)
|
||||
song="$(dbus-send --print-reply --dest=org.mpris.pogo /Player \
|
||||
org.freedesktop.MediaPlayer.GetMetadata |
|
||||
awk -F'"' '/string "artist"/ {
|
||||
getline;
|
||||
a=$2
|
||||
}
|
||||
/string "album"/ {
|
||||
getline;
|
||||
b=$2
|
||||
}
|
||||
/string "title"/ {
|
||||
getline;
|
||||
t=$2
|
||||
}
|
||||
END {print a " \n " b " \n " t}')"
|
||||
awk -F'"' 'BEGIN {RS=" entry"}; /"artist"/ {a=$4} /"album"/ {b=$4}
|
||||
/"title"/ {t=$4} END {print a "\n" b "\n" t}')"
|
||||
;;
|
||||
|
||||
*) mpc &>/dev/null && song="$(mpc -f '%artist%\n%album%\n%title%' current)" ;;
|
||||
|
|
Loading…
Reference in a new issue