refactor(hyprland): inline focus options
This commit is contained in:
@@ -80,26 +80,20 @@
|
|||||||
settings = {
|
settings = {
|
||||||
config.general.layout = "dwindle";
|
config.general.layout = "dwindle";
|
||||||
|
|
||||||
bind = lib.mapAttrsToList (
|
bind = lib.mapAttrsToList (_name: keybind: {
|
||||||
_name: keybind:
|
_args = [
|
||||||
let
|
keybind.keys
|
||||||
focusOptions = lib.filterAttrs (_name: value: value != null) {
|
(lib.generators.mkLuaInline (
|
||||||
inherit (keybind.action) direction workspace;
|
{
|
||||||
};
|
exec = "hl.dsp.exec_cmd(${lib.generators.toLua { } keybind.action.command})";
|
||||||
in
|
focus = "hl.dsp.focus(${
|
||||||
{
|
lib.generators.toLua { } { inherit (keybind.action) direction workspace; }
|
||||||
_args = [
|
})";
|
||||||
keybind.keys
|
}
|
||||||
(lib.generators.mkLuaInline (
|
.${keybind.action.kind}
|
||||||
{
|
))
|
||||||
exec = "hl.dsp.exec_cmd(${lib.generators.toLua { } keybind.action.command})";
|
];
|
||||||
focus = "hl.dsp.focus(${lib.generators.toLua { } focusOptions})";
|
}) (lib.attrByPath [ config.networking.hostName ] { } config.registry.keybind);
|
||||||
}
|
|
||||||
.${keybind.action.kind}
|
|
||||||
))
|
|
||||||
];
|
|
||||||
}
|
|
||||||
) (lib.attrByPath [ config.networking.hostName ] { } config.registry.keybind);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user