Add spotify-control script
This commit is contained in:
20
i3/scripts/spotify-control
Executable file
20
i3/scripts/spotify-control
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/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}"
|
||||||
|
~/.i3/scripts/bar-update spotify
|
||||||
Reference in New Issue
Block a user