Merge pull request #642 from mstraube/song

Fix song_shorthand, use dbus for audacious
This commit is contained in:
Dylan Araps 2017-01-26 20:09:58 +11:00 committed by GitHub
commit 0d9f95bf5e
1 changed files with 3 additions and 3 deletions

View File

@ -1281,9 +1281,9 @@ get_song() {
"google play"*) song="$(gpmdp-remote current)" ;;
"rhythmbox"*) song="$(rhythmbox-client --print-playing)" ;;
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist% - %title%')" ;;
"audacious"*) song="$(audtool current-song)" ;;
"xmms2d"*) song="$(xmms2 current -f '${artist} - ${title}')" ;;
"qmmp"*) song="$(qmmp --nowplaying '%p - %t')" ;;
"audacious"*) get_song_dbus "audacious" ;;
"gnome-music"*) get_song_dbus "GnomeMusic" ;;
"lollypop"*) get_song_dbus "Lollypop" ;;
"clementine"*) get_song_dbus "clementine" ;;
@ -1337,10 +1337,10 @@ get_song() {
;;
esac
[[ "$(trim "$song")" = "-" ]] && unset -v song
[[ "$(trim "$song")" == "-" ]] && unset -v song
# Display Artist and Title on separate lines.
if [[ "$song_shorthand" == "on" ]]; then
if [[ "$song_shorthand" == "on" && "$song" ]]; then
artist="${song/ -*}"
song="${song/*-}"