From 22680da4dd4c4c37a47460c9e24070859df109a2 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Tue, 26 Sep 2023 13:06:56 +0200 Subject: [PATCH] feat(wip): add swayidle --- home-manager/sway/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/home-manager/sway/default.nix b/home-manager/sway/default.nix index d2c21e8..b69e2d8 100644 --- a/home-manager/sway/default.nix +++ b/home-manager/sway/default.nix @@ -38,6 +38,17 @@ in }; }; + services.swayidle = { + enable = true; + events = [ + { event = "before-sleep"; command = "${pkgs.swaylock-fancy}/bin/swaylock-fancy"; } + ]; + timeouts = [ + { timeout = 60; command = "swaymsg \"output * power off\""; resumeCommand = "swaymsg \"output * power on\""; } + { timeout = 90; command = "${pkgs.swaylock-fancy}/bin/swaylock-fancy"; } + ]; + }; + wayland.windowManager.sway = { enable = true;