summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-08-30 22:44:17 +0530
committersinanmohd <sinan@sinanmohd.com>2024-08-31 06:19:48 +0530
commitfde6c893f0b15bef713450e533f7cadc8e1a2c1e (patch)
tree4e79abe18578ae7ca3b45d4ffc7ed8d7b3dc2c82
parent70829a0af6e4eb428acfe112fe51a09da3ec3291 (diff)
home/wayland/swayidle: exec swaylock before sleep
-rw-r--r--home/wayland/modules/sway/swayidle.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/home/wayland/modules/sway/swayidle.nix b/home/wayland/modules/sway/swayidle.nix
index abb3a10..8e5c208 100644
--- a/home/wayland/modules/sway/swayidle.nix
+++ b/home/wayland/modules/sway/swayidle.nix
@@ -44,6 +44,11 @@ in {
enable = true;
systemdTarget = "sway-session.target";
+ events = [{
+ event = "before-sleep";
+ command = swaylock;
+ }];
+
timeouts = [
{
timeout = minute * 4;