lock on suspend + manual
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
./fonts.nix
|
||||
./hardware-configuration.nix
|
||||
./hyprland-system.nix
|
||||
./lock-suspend.nix
|
||||
./networking.nix
|
||||
./nix-settings.nix
|
||||
./opengl.nix
|
||||
|
||||
+4
-3
@@ -69,8 +69,9 @@
|
||||
};
|
||||
|
||||
"$mod" = "SUPER";
|
||||
"$term" = "kitty";
|
||||
"$menu" = "wofi --show run";
|
||||
"$term" = "${pkgs.kitty}/bin/kitty";
|
||||
"$menu" = "${pkgs.wofi}/bin/wofi --show run";
|
||||
"$lock" = "${pkgs.hyprlock}/bin/hyprlock -n";
|
||||
|
||||
bind = [
|
||||
"$mod SHIFT, RETURN, exec, $term"
|
||||
@@ -78,7 +79,7 @@
|
||||
"$mod SHIFT, Q, exit"
|
||||
"$mod, P, exec, $menu"
|
||||
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, L, exec, $lock"
|
||||
|
||||
"$mod, H, movefocus, l"
|
||||
"$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