From 32757e4e15a1d4e7979782611c88a261662fb728 Mon Sep 17 00:00:00 2001 From: dabruh <11458706-dabruh@users.noreply.gitlab.com> Date: Thu, 30 Jun 2022 12:48:08 +0200 Subject: [PATCH] Screenshot before locking. --- .local/bin/i3exit | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.local/bin/i3exit b/.local/bin/i3exit index 02ae60d..19160a5 100755 --- a/.local/bin/i3exit +++ b/.local/bin/i3exit @@ -21,10 +21,12 @@ _unlock() { lock() { local screen=/tmp/screenshot.png blurred=/tmp/screenshotblur.png + $LOCK_SCREEN_BLUR && scrot -q 100 $screen # Take screenshot + _lock # Lock immediately - if $LOCK_SCREEN_BLUR; then - # Take screenshot and blur it + if [ -f $screen ]; then + # Blur screenshot scrot -q 100 $screen || return 1 # Larger file size, but faster convert -scale 10% -blur 0x1.25 -resize 1000% $screen $blurred || return 1 rm $screen