summaryrefslogtreecommitdiff
path: root/scripts/blurlock.sh
blob: 3317ca0035c1b789f6037cdc2c28b7b43811efbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
# Taken from https://github.com/levaphenyl/i3-blurlock

# One positional argument: blur radius (default to 2).
# Higher values mean stronger blur.
RADIUS=0x${1:-2}

# Take a screenshot and blur it
import -silent -window root png:- | \
    convert - -scale 20% -blur $RADIUS -resize 500% /tmp/screenshot.png
i3lock -i /tmp/screenshot.png
exit 0