i3: Use playerctl instead of raw dbus
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user