Add spotify control script

This commit is contained in:
2017-09-09 14:00:59 +02:00
parent 6dfbdf4179
commit b652dceb0a
2 changed files with 22 additions and 3 deletions

19
i3/scripts/spotify-control Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
case "$1" in
toggle)
cmd="PlayPause"
;;
next)
cmd="Next"
;;
previous)
cmd="Previous"
;;
*)
echo "wrong argument $1"
exit 1
;;
esac
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player."${cmd}"