Files
dotfiles/HOME/locker.sh
T
Henrik Bakken 94691be75a vim colors ++
2021-04-29 13:57:58 +02:00

12 lines
303 B
Bash

#!/bin/bash
set -eu
RESOLUTION=$(xrandr -q|sed -n 's/.*current[ ]\([0-9]*\) x \([0-9]*\),.*/\1x\2/p')
# lock the screen
import -silent -window root jpeg:- | convert - -scale 20% -blur 0x2.5 -resize 500% RGB:- | \
i3lock --raw $RESOLUTION:rgb -i /dev/stdin -e $@
# TODO fix - doesn't lock!
exit 0