lock.sh 404 B

123456789101112
  1. #!/bin/bash
  2. # Dependencies:
  3. # * scrot
  4. # * imagemagick
  5. scrot /tmp/screen.png
  6. convert /tmp/screen.png -scale 10% -scale 1000% /tmp/screen.png
  7. [[ -f $1 ]] && convert /tmp/screen.png $1 -gravity center -composite -matte /tmp/screen.png
  8. #dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop
  9. i3lock -u -i /tmp/screen.png
  10. rm /tmp/screen.png