Unverified Commit 38cb68b2 authored by dawidd6's avatar dawidd6

fix, when mpd server is on another host

parent 6bb7126a
......@@ -1332,6 +1332,10 @@ get_song() {
song="$(dbus-send --print-reply --dest=net.sacredchao.QuodLibet /net/sacredchao/QuodLibet net.sacredchao.QuodLibet.CurrentSong |\
awk -F'"' '/artist/ {getline; a=$2} /title/ {getline; t=$2} END{print a " - " t}')"
;;
*)
if type -p mpc >/dev/null; then song="$(mpc current)"; fi
;;
esac
[[ "$(trim "$song")" = "-" ]] && unset -v song
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment