ft: hyprland to home manager, mostly
This commit is contained in:
32
modules/desktop/hypr-shutdown.nix
Normal file
32
modules/desktop/hypr-shutdown.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ hyprLib, mainMod, ... }:
|
||||
|
||||
let
|
||||
inherit (hyprLib)
|
||||
bind
|
||||
exec
|
||||
submap
|
||||
makeSubmap
|
||||
;
|
||||
|
||||
systemModeName = " l e s h r ^s";
|
||||
exitScript = "~/.config/WMScripts/exit.sh";
|
||||
in
|
||||
{
|
||||
home-manager.users."djai".wayland.windowManager.hyprland.settings = {
|
||||
bind = [
|
||||
(bind "${mainMod} + SHIFT + E" (submap systemModeName) "Enter Shutdown mode")
|
||||
];
|
||||
|
||||
define_submap = [
|
||||
(makeSubmap systemModeName [
|
||||
["L" (exec "${exitScript} lock") "Lock the machine"]
|
||||
["E" (exec "${exitScript} logout") "Log out"]
|
||||
["S" (exec "${exitScript} suspend") "Suspend the machine"]
|
||||
["H" (exec "${exitScript} hibernate") "Hibernate the machine"]
|
||||
["R" (exec "${exitScript} reboot") "Reboot the machine"]
|
||||
["SHIFT + S" (exec "${exitScript} shutdown") "Power the machine off"]
|
||||
["ESCAPE" (submap "reset") "Return to default mode"]
|
||||
])
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user