parent
a0083edf7e
commit
772a350fa1
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script takes a screenshot and pixellates it, then uses it as the i3lock
|
||||
# background. It was borrowed from here:
|
||||
# https://faq.i3wm.org/question/83/how-to-run-i3lock-after-computer-inactivity.1.html
|
||||
|
||||
set -e
|
||||
|
||||
IMG_PATH=/tmp/i3-pixlock.png
|
||||
|
||||
scrot $IMG_PATH
|
||||
|
||||
# Pixellate it 10x
|
||||
convert $IMG_PATH -scale 5% -scale 2000% $IMG_PATH
|
||||
|
||||
# Lock screen displaying this image.
|
||||
i3lock -i $IMG_PATH
|
||||
|
||||
# Now turn off the screen after 60 seconds, as long as i3lock is still running
|
||||
sleep 120; pgrep i3lock && xset dpms force off
|
Loading…
Reference in new issue