spotify: try to support the new version of Spotify

It doesn't provide a DBus interface. Try to use xdotool instead. For
some reason, not working.
This commit is contained in:
Vincent Bernat 2015-07-12 11:31:13 +02:00
parent db2d169a57
commit 6c8985a9ae
3 changed files with 60 additions and 47 deletions

View file

@ -22,8 +22,7 @@ case "$1" in
;;
lock)
# First, stop Spotify
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify \
/org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause
xdotool key XF86AudioPause
# Then, lock screen
i3lock_options="-e -i $HOME/.cache/awesome/current-wallpaper.png -t"
echo "$(date --rfc-3339=seconds) $me: lock: lock screen"