commit 3bd2a9ecd0870f2051f239143dc75ca75748f7d0 parent caf7be17563448423aa99c274ee331490dde879b Author: Chris Bracken <chris@bracken.jp> Date: Wed, 8 Sep 2021 17:14:37 -0700 sway: update sleep/suspend settings New schedule: * after 10 minutes: lock the screen * after 10.5 minutes: put the display to sleep * after 11.5 minutes: put the computer to sleep Diffstat:
M | .config/sway/config | | | 15 | ++++++++++----- |
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/.config/sway/config b/.config/sway/config @@ -43,16 +43,21 @@ set $menu wofi --show run # Set lock screen handler. set $lock_screen swaylock -c 000000 +# Set the suspend command. +set $suspend_system systemctl suspend + ############################################################ # Idle configuration -# Lock screen after 300 seconds of inactivity, then turn off displays after -# another 300 seconds, and turn screens back on when resumed. Also lock screen -# before the computer goes to sleep. +# Lock screen after 600 seconds of inactivity, then turn off displays after +# another 60 seconds, then put the computer to sleep 60 seconds after that. +# Turn screens back on when resumed. Also ensure the screen is locked before +# the computer goes to sleep. exec swayidle -w \ - timeout 300 '$lock_screen' \ - timeout 600 'swaymsg "output * dpms off"' \ + timeout 600 '$lock_screen' \ + timeout 660 'swaymsg "output * dpms off"' \ + timeout 720 '$suspend_system' \ resume 'swaymsg "output * dpms on"' \ before-sleep '$lock_screen'