pinwheel: Lock instead of suspend on lid close

Have logind ignore the lid switch and suspend/hibernate keys so the
machine stays reachable over SSH with the lid closed. SUPER + SHIFT + x
remains the way to suspend; closing the lid now only locks the screen.
This commit is contained in:
Alexander Heldt committed 2026-10-22 19:37:42 +02:00
1 parent 36292c4f14
commit 48248e8c7d
2 files changed
+15

No files matched your search

@@ -82,6 +82,13 @@ in
(lib.generators.mkLuaInline ''hl.dsp.exec_cmd("${pause-music}; ${dpms-lock}")'') (lib.generators.mkLuaInline ''hl.dsp.exec_cmd("${pause-music}; ${dpms-lock}")'')
]; ];
} }
{
_args = [
"switch:on:Lid Switch"
(lib.generators.mkLuaInline ''hl.dsp.exec_cmd("${pkgs.procps}/bin/pidof hyprlock || { ${pause-music}; ${dpms-lock}; }")'')
{ locked = true; }
];
}
{ {
_args = [ _args = [
"SUPER + SHIFT + x" "SUPER + SHIFT + x"
+8
View File
@@ -40,6 +40,14 @@ in
enable = true; enable = true;
}; };
logind.settings.Login = {
HandleLidSwitch = "ignore";
HandleLidSwitchExternalPower = "ignore";
HandleLidSwitchDocked = "ignore";
HandleSuspendKey = "ignore";
HandleHibernateKey = "ignore";
};
tlp = { tlp = {
enable = true; enable = true;