lock on suspend + manual
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
./fonts.nix
|
./fonts.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./hyprland-system.nix
|
./hyprland-system.nix
|
||||||
|
./lock-suspend.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
./nix-settings.nix
|
./nix-settings.nix
|
||||||
./opengl.nix
|
./opengl.nix
|
||||||
|
|||||||
+4
-3
@@ -69,8 +69,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
"$mod" = "SUPER";
|
"$mod" = "SUPER";
|
||||||
"$term" = "kitty";
|
"$term" = "${pkgs.kitty}/bin/kitty";
|
||||||
"$menu" = "wofi --show run";
|
"$menu" = "${pkgs.wofi}/bin/wofi --show run";
|
||||||
|
"$lock" = "${pkgs.hyprlock}/bin/hyprlock -n";
|
||||||
|
|
||||||
bind = [
|
bind = [
|
||||||
"$mod SHIFT, RETURN, exec, $term"
|
"$mod SHIFT, RETURN, exec, $term"
|
||||||
@@ -78,7 +79,7 @@
|
|||||||
"$mod SHIFT, Q, exit"
|
"$mod SHIFT, Q, exit"
|
||||||
"$mod, P, exec, $menu"
|
"$mod, P, exec, $menu"
|
||||||
|
|
||||||
"$mod, mouse:272, movewindow"
|
"$mod, L, exec, $lock"
|
||||||
|
|
||||||
"$mod, H, movefocus, l"
|
"$mod, H, movefocus, l"
|
||||||
"$mod, J, movefocus, r"
|
"$mod, J, movefocus, r"
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.logind = {
|
||||||
|
lidSwitch = "suspend"; # suspend on lid close
|
||||||
|
handleLidSwitch = "suspend"; # explicit
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.hyprlock-pre-suspend = {
|
||||||
|
description = "Lock screen before suspend";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
# Run as your user
|
||||||
|
ExecStart = "${pkgs.hyprlock}/bin/hyprlock -n";
|
||||||
|
};
|
||||||
|
install.wantedBy = [ "sleep.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user