Auto lock and sleep

This commit is contained in:
RealStickman 2022-07-20 16:00:15 +02:00
parent 57d21d4736
commit c74c9c8de8

View File

@ -40,10 +40,10 @@ input * {
} }
### Output configuration ### Output configuration
#
# Default wallpaper (more resolutions are available in @datadir@/backgrounds/sway/) # Default wallpaper (more resolutions are available in @datadir@/backgrounds/sway/)
output * bg ~/.cache/betterlockscreen/current/wall_dim.png fill output * bg ~/.cache/betterlockscreen/current/wall_dim.png fill
#
# Example configuration: # Example configuration:
# #
# output HDMI-A-1 resolution 1920x1080 position 1920,0 # output HDMI-A-1 resolution 1920x1080 position 1920,0
@ -63,6 +63,11 @@ output * bg ~/.cache/betterlockscreen/current/wall_dim.png fill
# your displays after another 300 seconds, and turn your screens back on when # your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep. # resumed. It will also lock your screen before your computer goes to sleep.
exec swayidle -w \
timeout 20 'swaylock -f -c 000000' \
timeout 40 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
before-sleep 'swaylock -f -c 000000'
### Input configuration ### Input configuration
# #
# Example configuration: # Example configuration: