about summary refs log tree commit diff
path: root/.local/bin/lock-screen
blob: 4307c9a2ccb1731c911872b80ed528c982e2a1a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash

if [[ $1 =~ ^[0-9]+$ ]]; then
    SLEEP_DURATION=$1
else
    SLEEP_DURATION=10
fi

grim /tmp/lockscreen-0.png
magick /tmp/lockscreen-0.png -scale 10% -blur 0x1 -resize 1000% /tmp/lockscreen.png
swaylock -i /tmp/lockscreen.png &
sleep $SLEEP_DURATION
systemctl sleep