summaryrefslogtreecommitdiff
path: root/hm/env/swayidle.nix
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2026-01-08 17:15:02 +0100
committeradikro <adikro@disroot.org>2026-01-08 17:15:02 +0100
commit6fc5210d51c630dd944d3050328a784b4ece81ba (patch)
tree0c0759cccefe64fd7d1a00a95919a4e315934b73 /hm/env/swayidle.nix
parentdf6d72246bfe33f6f04617c201d45e2f92689560 (diff)
changed pc to stable drivers, updated amdgpu drivers and reverted to older kernel version, added swaylock and swayidle, revamped screenshots and niri keybinds
Diffstat (limited to 'hm/env/swayidle.nix')
-rw-r--r--hm/env/swayidle.nix15
1 files changed, 14 insertions, 1 deletions
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";
+ }
+ ];
};
};
}