This commit is contained in:
2025-11-03 02:51:16 +09:00
parent 70794c2bd0
commit 1a8b4f0a41
2 changed files with 4 additions and 7 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
};
logind = {
lidSwitch = "lock"; # Lock when lid is closed
lidSwitch = "suspend"; # Lock when lid is closed
lidSwitchDocked = "ignore"; # Ignore when docked
extraConfig = ''
HandleLidSwitchExternalPower=lock
+3 -6
View File
@@ -7,7 +7,6 @@ let
lockCmd = "${noctaliaExe} ipc call sessionMenu lock";
lockAndSuspendCmd= "${noctaliaExe} ipc call sessionMenu lockAndSuspend";
dpmsOff = "${pkgs.niri}/bin/niri msg action power-off-monitors";
dpmsOn = "${pkgs.niri}/bin/niri msg action power-on-monitors";
in
@@ -17,14 +16,12 @@ in
systemdTarget = "graphical-session.target";
timeouts = [
{ timeout = 300; command = noctaliaLock; }
{ timeout = 306; command = dpmsOff; resumeCommand = dpmsOn; }
{ timeout = 300; command = lockAndSuspendCmd; }
];
events = [
{ event = "lock"; command = noctaliaLock; }
{ event = "before-sleep"; command = noctaliaLock; }
{ event = "lock"; command = lockCmd; }
{ event = "before-sleep"; command = lockCmd; }
{ event = "after-resume"; command = dpmsOn; }
];
};