# HG changeset patch # User Peter Sanchez # Date 1740660619 21600 # Thu Feb 27 06:50:19 2025 -0600 # Node ID cb13b732e272312ab1c0efd84d96e6230f7e9495 # Parent 381353886fb43d5250ebe0190ea352d7c78be8e6 Removing delay when locking with suspend diff --git a/bin/betterlockscreen b/bin/betterlockscreen --- a/bin/betterlockscreen +++ b/bin/betterlockscreen @@ -20,6 +20,7 @@ solid_color=333333 description="" quiet=false + runsuspend=false i3lockcolor_bin="i3lock-color" if ! cmd_exists "$i3lockcolor_bin" && cmd_exists "i3lock"; then @@ -273,7 +274,11 @@ dunstctl set-paused false fi - sleep 5 && [[ 4000 -lt $(xssstate -i) ]] && pgrep -x i3lock && xset dpms force off + + if [[ "$runsuspend" != true ]]; then + sleep 5 && [[ 4000 -lt $(xssstate -i) ]] && pgrep -x i3lock && xset dpms force off + fi + #sleep 5 && [[ 4000 -lt $(xssstate -i) ]] && pgrep -x i3lock && xset dpms force off }