dotfiles/.local/bin/lockscreen

25 lines
492 B
Plaintext
Raw Permalink Normal View History

2020-05-25 11:29:57 +02:00
#!/bin/sh
#:clean temp dir
rm -Rf $HOME/.tmp/lscreen
#:make temp dir
mkdir -p $HOME/.tmp/lscreen
#:define paths as variables
screen=$HOME/.tmp/lscreen/screen.png
lbg=$HOME/.tmp/lscreen/lbg.png
#:take screenshot
grim $screen
#:stretch the screenshot to pixelate - fast
convert $screen -scale 10% -scale 1000% $lbg
#:simple bidirectional blur - slow
#convert $screen -blur 0x8 $lbg
#:remove original screenshot
rm $screen
#:execute lock with created background
swaylock -f -e -i "$lbg"