feat(hyprland): emit compositor config as lua
This commit is contained in:
1 parent
4908c4751f
commit
fce4bdc526
9 files changed
+346
-119
No files matched your search
@@ -6,9 +6,21 @@
|
||||
}:
|
||||
# mako as the notification daemon: toasts, a do-not-disturb mode, and history recall.
|
||||
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;
|
||||
|
||||
makoctl = "${pkgs.mako}/bin/makoctl";
|
||||
|
||||
toLua = lib.generators.toLua { };
|
||||
in
|
||||
{
|
||||
options.modules.desktop.session.mako.enable = lib.mkEnableOption "the mako notification daemon";
|
||||
@@ -34,9 +46,8 @@ in
|
||||
|
||||
# Recall the last notification from history, keyboard-only like the rest
|
||||
# of the session.
|
||||
# $mod is defined by the compositor config these binds share.
|
||||
wayland.windowManager.hyprland.settings.bind = [
|
||||
"$mod, N, exec, ${makoctl} restore"
|
||||
(execBind "SUPER + N" "${makoctl} restore")
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user