{ 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"] ]) ]; }; }