Add playerctl support (#1475)
This commit is contained in:
parent
d14dc2d54f
commit
298d75665a
6
neofetch
6
neofetch
|
@ -501,6 +501,7 @@ disk_percent="on"
|
||||||
# mpd
|
# mpd
|
||||||
# muine
|
# muine
|
||||||
# netease-cloud-music
|
# netease-cloud-music
|
||||||
|
# playerctl
|
||||||
# pogo
|
# pogo
|
||||||
# pragha
|
# pragha
|
||||||
# qmmp
|
# qmmp
|
||||||
|
@ -2656,6 +2657,7 @@ get_song() {
|
||||||
"muine"
|
"muine"
|
||||||
"netease-cloud-music"
|
"netease-cloud-music"
|
||||||
"plasma-browser-integration"
|
"plasma-browser-integration"
|
||||||
|
"playerctl"
|
||||||
"pogo"
|
"pogo"
|
||||||
"pragha"
|
"pragha"
|
||||||
"qmmp"
|
"qmmp"
|
||||||
|
@ -2792,6 +2794,10 @@ get_song() {
|
||||||
/"title"/ {t=$4} END {print a " \n" b " \n" t}')"
|
/"title"/ {t=$4} END {print a " \n" b " \n" t}')"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"playerctl"*)
|
||||||
|
song="$(playerctl metadata --format '{{ artist }} \n{{ album }} \n{{ title }}')"
|
||||||
|
;;
|
||||||
|
|
||||||
*) mpc &>/dev/null && song="$(mpc -f '%artist% \n%album% \n%title%' current)" || return ;;
|
*) mpc &>/dev/null && song="$(mpc -f '%artist% \n%album% \n%title%' current)" || return ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Reference in New Issue