From 7926055261cfa35cc96e89d2a0dd7894f22855a6 Mon Sep 17 00:00:00 2001 From: dalahast Date: Mon, 25 May 2020 11:29:57 +0200 Subject: [PATCH] add screen locking script --- .local/bin/lockscreen | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 .local/bin/lockscreen 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" +