feat(hyprland): emit compositor config as lua

This commit is contained in:
alexion committed 2026-10-09 20:12:07 -04:00
1 parent 4908c4751f
commit fce4bdc526
9 files changed
+346 -119

No files matched your search

+14 -3
View File
@@ -6,6 +6,16 @@
}:
# rofi as the desktop launcher and dmenu-style menu frontend.
let
execBind = key: command: {
_args = [
key
(luaCall "hl.dsp.exec_cmd" [ command ])
];
};
luaCall =
function: args:
lib.generators.mkLuaInline "${function}(${lib.concatMapStringsSep ", " toLua args})";
user = config.user.name;
# A session menu built on the same themed rofi, so the power actions look
@@ -21,6 +31,8 @@ let
'Shut down') ${pkgs.systemd}/bin/systemctl poweroff ;;
esac
'';
toLua = lib.generators.toLua { };
in
{
options.modules.desktop.session.rofi.enable = lib.mkEnableOption "the rofi launcher";
@@ -41,10 +53,9 @@ in
};
# The launcher and the session menu, kept next to the tool they drive.
# $mod is defined by the compositor config these binds share.
wayland.windowManager.hyprland.settings.bind = [
"$mod, R, exec, ${pkgs.rofi}/bin/rofi -show drun"
"$mod SHIFT, X, exec, ${powerMenu}"
(execBind "SUPER + R" "${pkgs.rofi}/bin/rofi -show drun")
(execBind "SUPER + SHIFT + X" "${powerMenu}")
];
};
};