Merge pull request #642 from mstraube/song
Fix song_shorthand, use dbus for audacious
This commit is contained in:
commit
0d9f95bf5e
6
neofetch
6
neofetch
|
@ -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/*-}"
|
||||
|
||||
|
|
Reference in New Issue