spotify-ctrl 328 B

12345678910
  1. #!/bin/sh
  2. # Utility to control spotify via dbus ~ mainly used as script for i3 key-bindings
  3. if [ ${#1} -le 0 ]
  4. then
  5. echo '[-] No Arguments'
  6. exit 1
  7. fi
  8. dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.$(echo $1 | sed 's/Play/PlayPause/') 2> /dev/null