aboutsummaryrefslogtreecommitdiff
path: root/misc/.local/bin/screenlock
blob: d08cd9ba74ef7b2167f5a96bcd35ed15b4005d05 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# Dependences:
#   scrot
#   imagemagick
#   i3lock

SCREEN=$TMPDIR/bg.png

# Take (silent) screenshot
scrot "$SCREEN" -z
# Create pixelated effect
convert "$SCREEN" -scale 10% -scale 1000% "$SCREEN"
# Lock screen
i3lock -eui "$SCREEN"
# Get rid of temporary background image
rm "$SCREEN"