i3: Use playerctl instead of raw dbus

This commit is contained in:
2020-12-20 21:52:25 +01:00
parent 465a84f86f
commit a0561f2278

View File

@@ -2,13 +2,13 @@
case "$1" in case "$1" in
toggle) toggle)
cmd="PlayPause" cmd="play-pause"
;; ;;
next) next)
cmd="Next" cmd="next"
;; ;;
previous) previous)
cmd="Previous" cmd="previous"
;; ;;
*) *)
echo "wrong argument $1" echo "wrong argument $1"
@@ -16,5 +16,5 @@ previous)
;; ;;
esac esac
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player."${cmd}" playerctl "${cmd}"
~/.i3/scripts/bar-update spotify ~/.i3/scripts/bar-update spotify