Merge pull request #642 from mstraube/song
Fix song_shorthand, use dbus for audacious
This commit is contained in:
commit
0d9f95bf5e
1 changed files with 3 additions and 3 deletions
6
neofetch
6
neofetch
|
@ -1281,9 +1281,9 @@ get_song() {
|
||||||
"google play"*) song="$(gpmdp-remote current)" ;;
|
"google play"*) song="$(gpmdp-remote current)" ;;
|
||||||
"rhythmbox"*) song="$(rhythmbox-client --print-playing)" ;;
|
"rhythmbox"*) song="$(rhythmbox-client --print-playing)" ;;
|
||||||
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist% - %title%')" ;;
|
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist% - %title%')" ;;
|
||||||
"audacious"*) song="$(audtool current-song)" ;;
|
|
||||||
"xmms2d"*) song="$(xmms2 current -f '${artist} - ${title}')" ;;
|
"xmms2d"*) song="$(xmms2 current -f '${artist} - ${title}')" ;;
|
||||||
"qmmp"*) song="$(qmmp --nowplaying '%p - %t')" ;;
|
"qmmp"*) song="$(qmmp --nowplaying '%p - %t')" ;;
|
||||||
|
"audacious"*) get_song_dbus "audacious" ;;
|
||||||
"gnome-music"*) get_song_dbus "GnomeMusic" ;;
|
"gnome-music"*) get_song_dbus "GnomeMusic" ;;
|
||||||
"lollypop"*) get_song_dbus "Lollypop" ;;
|
"lollypop"*) get_song_dbus "Lollypop" ;;
|
||||||
"clementine"*) get_song_dbus "clementine" ;;
|
"clementine"*) get_song_dbus "clementine" ;;
|
||||||
|
@ -1337,10 +1337,10 @@ get_song() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[[ "$(trim "$song")" = "-" ]] && unset -v song
|
[[ "$(trim "$song")" == "-" ]] && unset -v song
|
||||||
|
|
||||||
# Display Artist and Title on separate lines.
|
# Display Artist and Title on separate lines.
|
||||||
if [[ "$song_shorthand" == "on" ]]; then
|
if [[ "$song_shorthand" == "on" && "$song" ]]; then
|
||||||
artist="${song/ -*}"
|
artist="${song/ -*}"
|
||||||
song="${song/*-}"
|
song="${song/*-}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue