From 6fc5210d51c630dd944d3050328a784b4ece81ba Mon Sep 17 00:00:00 2001 From: adikro Date: Thu, 8 Jan 2026 17:15:02 +0100 Subject: changed pc to stable drivers, updated amdgpu drivers and reverted to older kernel version, added swaylock and swayidle, revamped screenshots and niri keybinds --- hm/env/swayidle.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'hm/env/swayidle.nix') diff --git a/hm/env/swayidle.nix b/hm/env/swayidle.nix index 41f64a2..1d703cc 100644 --- a/hm/env/swayidle.nix +++ b/hm/env/swayidle.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: let cfg = config.hm.env.swayidle; in @@ -7,6 +7,19 @@ in config = lib.mkIf cfg.enable { services.swayidle = { enable = true; + systemdTarget = "graphical-session.target"; + events = { + before-sleep = "${pkgs.swaylock-effects}/bin/swaylock -f"; + lock = "${pkgs.swaylock-effects}/bin/swaylock -f"; + }; + timeouts = [ + { timeout = 300; command = "${pkgs.swaylock-effects}/bin/swaylock -f"; } + { + timeout = 600; + command = "${pkgs.niri-unstable}/bin/niri msg action power-off-monitors"; + resumeCommand = "${pkgs.niri-unstable}/bin/niri msg action power-on-monitors"; + } + ]; }; }; } -- cgit v1.3