Skip to content

Instantly share code, notes, and snippets.

@j6s
Created March 24, 2016 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j6s/94b98f6f60ce48d064a2 to your computer and use it in GitHub Desktop.
Save j6s/94b98f6f60ce48d064a2 to your computer and use it in GitHub Desktop.
#!/bin/sh
FILE=/tmp/screen_lock.png;
# take screenshot
scrot $FILE;
# pixelate
mogrify -scale 10% -scale 1000% $FILE
# Lock
i3lock -i $FILE;
# turn off screen
sleep 60;
pgrep i3lock && xset dpms force off;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment