aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bin/lock12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/bin/lock b/scripts/bin/lock
new file mode 100755
index 0000000..f73b3de
--- /dev/null
+++ b/scripts/bin/lock
@@ -0,0 +1,12 @@
1#!/bin/sh -e
2
3# Take a screenshot
4scrot -o /tmp/screen_locked.png
5# Pixellate it 10x
6mogrify -scale 10% -scale 1000% /tmp/screen_locked.png
7# Lock screen displaying this image.
8i3lock -i /tmp/screen_locked.png
9# Turn the screen off after a delay.
10sleep 60
11# if i3lock is still running
12pgrep i3lock && xset dpms force off