From 94b85274453ef54348334b2a08fe867403a667e9 Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Fri, 26 Dec 2025 14:37:21 +1000 Subject: [PATCH] Change swaylock config --- alex/sway.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/alex/sway.nix b/alex/sway.nix index c30cb54..19e6c22 100644 --- a/alex/sway.nix +++ b/alex/sway.nix @@ -150,7 +150,6 @@ in startup = [ { command = "waybar"; } { command = "mako"; } - { command = "swayidle -w timeout 300 'swaylock -f' timeout 600 'swaymsg \"output * dpms off\"' resume 'swaymsg \"output * dpms on\"' timeout 900 'systemctl suspend' before-sleep 'swaylock -f'"; } ]; keybindings = let @@ -208,6 +207,18 @@ in }; }; + services.swayidle = { + enable = true; + timeouts = [ + { timeout = 300; command = "swaylock -f"; } + { timeout = 600; command = "swaymsg \"output * dpms off\""; resumeCommand = "swaymsg \"output * dpms on\""; } + { timeout = 900; command = "systemctl suspend"; } + ]; + events = [ + { event = "before-sleep"; command = "swaylock -f"; } + ]; + }; + programs.rofi = { enable = true; font = "JetBrainsMono Nerd Font 12";