lock: stop spotify when locking

This commit is contained in:
Vincent Bernat 2014-12-11 08:32:21 +01:00
parent 539f0cd41a
commit 27599fedcc

View file

@ -21,6 +21,10 @@ case "$1" in
wait wait
;; ;;
lock) lock)
# First, stop Spotify
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify \
/org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause
# Then, lock screen
i3lock_options="-e -i $HOME/.cache/awesome/current-wallpaper.png" i3lock_options="-e -i $HOME/.cache/awesome/current-wallpaper.png"
echo "$(date --rfc-3339=seconds) $me: lock: lock screen" echo "$(date --rfc-3339=seconds) $me: lock: lock screen"
if [ -e /proc/self/fd/${XSS_SLEEP_LOCK_FD:--1} ]; then if [ -e /proc/self/fd/${XSS_SLEEP_LOCK_FD:--1} ]; then