1
0
forked from extern/nix-config

meta: Add swayidle

This lets us automatically start swaylock on lid close, useful when on
the go, although not a replacement for turning off a computer fully.
This commit is contained in:
Donovan Glover 2022-03-24 08:58:14 -04:00
parent 9ae4f4442e
commit eeeaa82bc5
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
3 changed files with 21 additions and 0 deletions

View File

@ -178,4 +178,7 @@ bindsym XF86MonBrightnessUp exec brightnessctl set +5%
# bindsym XF86WLAN exec
# bindsym XF86Favorites exec
# Lock the screen after a certain amount of time
exec swayidle -w
include /etc/sway/config.d/*

View File

@ -0,0 +1,2 @@
timeout 300 swaylock
before-sleep swaylock

16
swayidle/README.md Normal file
View File

@ -0,0 +1,16 @@
# swayidle
[swayidle][swayidle] is an idle management daemon for Wayland.
## Use Cases
swayidle can be used to:
- Automatically lock the screen after a period of inactivity
- Automatically lock the screen on lid close (e.g. on a laptop)
You should not use swayidle if:
- You don't want to automatically lock the screen.
[swayidle]: https://github.com/swaywm/swayidle