Merge branch 'master' of github.com:dylanaraps/neofetch

This commit is contained in:
Dylan Araps 2019-12-29 23:46:51 +00:00
commit 62e52b8270
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 22 additions and 23 deletions

View File

@ -2601,11 +2601,9 @@ get_song() {
}
case ${player/*\/} in
"mpd"*|"mopidy"*) song="$(mpc -f '%artist%\n%album%\n%title%' current "${mpc_args[@]}")" ;;
"mocp"*) song="$(mocp -Q '%artist \n%album \n%song')" ;;
"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')" ;;
"qmmp"*) song="$(qmmp --nowplaying '%p \n%a \n%t')" ;;
"gnome-music"*) get_song_dbus "GnomeMusic" ;;
"lollypop"*) get_song_dbus "Lollypop" ;;
"clementine"*) get_song_dbus "clementine" ;;
@ -2632,18 +2630,19 @@ get_song() {
"plasma-browser-integration"*) get_song_dbus "plasma-browser-integration" ;;
"io.elementary.music"*) get_song_dbus "Music" ;;
"mpd"* | "mopidy"*)
song="$(mpc -f '%artist% \n%album% \n%title%' current "${mpc_args[@]}")"
;;
"xmms2d"*)
song="$(xmms2 current -f "\${artist}"$' \n'"\${album}"$' \n'"\${title}")"
;;
"cmus"*)
# NOTE: cmus >= 2.8.0 supports mpris2
song="$(cmus-remote -Q | awk 'BEGIN { ORS=" "};
/tag artist/ {
$1=$2=""; sub(" ", ""); a=$0
}
/tag album / {
$1=$2=""; sub(" ", ""); b=$0
}
/tag title/ {
$1=$2=""; sub(" ", ""); t=$0
}
song="$(cmus-remote -Q | awk '/tag artist/ {$1=$2=""; a=$0}
/tag album / {$1=$2=""; b=$0}
/tag title/ {$1=$2=""; t=$0}
END {print a " \n" b " \n" t}')"
;;