Screenshot before locking.

This commit is contained in:
dabruh 2022-06-30 12:48:08 +02:00
parent daf4a691eb
commit 32757e4e15
1 changed files with 4 additions and 2 deletions

View File

@ -21,10 +21,12 @@ _unlock() {
lock() { lock() {
local screen=/tmp/screenshot.png blurred=/tmp/screenshotblur.png local screen=/tmp/screenshot.png blurred=/tmp/screenshotblur.png
$LOCK_SCREEN_BLUR && scrot -q 100 $screen # Take screenshot
_lock # Lock immediately _lock # Lock immediately
if $LOCK_SCREEN_BLUR; then if [ -f $screen ]; then
# Take screenshot and blur it # Blur screenshot
scrot -q 100 $screen || return 1 # Larger file size, but faster scrot -q 100 $screen || return 1 # Larger file size, but faster
convert -scale 10% -blur 0x1.25 -resize 1000% $screen $blurred || return 1 convert -scale 10% -blur 0x1.25 -resize 1000% $screen $blurred || return 1
rm $screen rm $screen