diff --git a/.local/bin/lockscreen b/.local/bin/lockscreen new file mode 100755 index 0000000..1b8cf75 --- /dev/null +++ b/.local/bin/lockscreen @@ -0,0 +1,24 @@ +#!/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" +