diff --git a/hosts/pinwheel/modules/hyprlock/default.nix b/hosts/pinwheel/modules/hyprlock/default.nix index 45fc591..76ff1c1 100644 --- a/hosts/pinwheel/modules/hyprlock/default.nix +++ b/hosts/pinwheel/modules/hyprlock/default.nix @@ -82,6 +82,13 @@ in (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 = [ "SUPER + SHIFT + x" diff --git a/hosts/pinwheel/modules/power/default.nix b/hosts/pinwheel/modules/power/default.nix index ae5defa..c61b28a 100644 --- a/hosts/pinwheel/modules/power/default.nix +++ b/hosts/pinwheel/modules/power/default.nix @@ -40,6 +40,14 @@ in enable = true; }; + logind.settings.Login = { + HandleLidSwitch = "ignore"; + HandleLidSwitchExternalPower = "ignore"; + HandleLidSwitchDocked = "ignore"; + HandleSuspendKey = "ignore"; + HandleHibernateKey = "ignore"; + }; + tlp = { enable = true;