From 359c9a6597934892e6020203d86471cf15dcc4ab Mon Sep 17 00:00:00 2001 From: Galen Guyer Date: Fri, 26 Aug 2022 14:17:35 -0400 Subject: Make screen locking faster --- ext/lock.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ext/lock.sh b/ext/lock.sh index 440c87f..2ef947f 100755 --- a/ext/lock.sh +++ b/ext/lock.sh @@ -1,8 +1,15 @@ #!/bin/bash set -eu -scrot -o /tmp/screenshot.png -convert /tmp/screenshot.png -blur 0x16 -brightness-contrast -5 /tmp/screenshot.png +scrot --quality=10 -o /tmp/.lockscreen.png +convert /tmp/.lockscreen.png \ + -scale 5% \ + -define png:compression-filter=5 \ + -define png:compression-level=1 \ + -brightness-contrast -5 \ + -blur 0x0.4 \ + -scale 2000% \ + /tmp/.lockscreen.png # Turn on DND #old_dnd="$(xfconf-query -c xfce4-notifyd -p /do-not-disturb)" @@ -13,7 +20,7 @@ convert /tmp/screenshot.png -blur 0x16 -brightness-contrast -5 /tmp/screenshot.p #old_mute="$(amixer get Master | tail -2 | grep '\[on\]')" #amixer set Master mute > /dev/null -i3lock -ni /tmp/screenshot.png +i3lock --nofork --ignore-empty-password --show-failed-attempts --image /tmp/.lockscreen.png & # Set settings back to what they were before #test -z "$old_mute" || amixer set Master unmute > /dev/null -- cgit v1.2.3