Pause the music before locking the screen

This commit is contained in:
Thomas Dehaeze 2019-07-12 13:25:50 +02:00
parent 7249723bc9
commit 9048aa52b8

View File

@ -26,6 +26,14 @@ First, turn off dunst
killall -SIGUSR1 dunst && echo "off" > /tmp/dunststatus;
#+end_src
Turn off the music if it is playing.
#+begin_src bash
MPC_STATE=$(mpc | sed -n '2p' | cut -d "[" -f2 | cut -d "]" -f1)
if [[ $MPC_STATE == "playing" ]]; then
mpc pause
fi
#+end_src
Then take a screenshot and process it.
#+begin_src bash
temp_file="/tmp/screen.png"