34 lines
1.0 KiB
Nix
34 lines
1.0 KiB
Nix
{ hyprLib, mainMod, ... }:
|
|
|
|
let
|
|
inherit (hyprLib)
|
|
bind
|
|
exec
|
|
submap
|
|
makeSubmap
|
|
muldsp
|
|
;
|
|
|
|
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" (muldsp [(exec "${exitScript} lock") (submap "reset")]) "Lock the machine"]
|
|
["E" (muldsp [(exec "${exitScript} logout") (submap "reset")]) "Log out"]
|
|
["S" (muldsp [(exec "${exitScript} suspend") (submap "reset")]) "Suspend the machine"]
|
|
["H" (muldsp [(exec "${exitScript} hibernate") (submap "reset")]) "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"]
|
|
])
|
|
];
|
|
};
|
|
}
|