feat(hyprland): add directional focus binds
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
config = lib.mkIf config.modules.desktop.session.hyprland.enable {
|
||||
registry.keybind.${config.networking.hostName} = lib.listToAttrs (
|
||||
map (workspace: {
|
||||
(map (workspace: {
|
||||
name = "hyprland-workspace-${toString workspace}";
|
||||
value = {
|
||||
keys = "SUPER + ${toString workspace}";
|
||||
@@ -18,7 +18,40 @@
|
||||
inherit workspace;
|
||||
};
|
||||
};
|
||||
}) (lib.range 1 9)
|
||||
}) (lib.range 1 9))
|
||||
++
|
||||
map
|
||||
(
|
||||
{ direction, key }:
|
||||
{
|
||||
name = "hyprland-focus-${direction}";
|
||||
value = {
|
||||
keys = "SUPER + ${key}";
|
||||
action = {
|
||||
kind = "focus-direction";
|
||||
inherit direction;
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
[
|
||||
{
|
||||
key = "H";
|
||||
direction = "left";
|
||||
}
|
||||
{
|
||||
key = "J";
|
||||
direction = "down";
|
||||
}
|
||||
{
|
||||
key = "K";
|
||||
direction = "up";
|
||||
}
|
||||
{
|
||||
key = "L";
|
||||
direction = "right";
|
||||
}
|
||||
]
|
||||
);
|
||||
|
||||
# This program integration owns the session, portals, and polkit, launched
|
||||
@@ -53,6 +86,9 @@
|
||||
(lib.generators.mkLuaInline (
|
||||
{
|
||||
exec = "hl.dsp.exec_cmd(${lib.generators.toLua { } keybind.action.command})";
|
||||
"focus-direction" = "hl.dsp.focus(${
|
||||
lib.generators.toLua { } { inherit (keybind.action) direction; }
|
||||
})";
|
||||
"focus-workspace" = "hl.dsp.focus(${
|
||||
lib.generators.toLua { } { inherit (keybind.action) workspace; }
|
||||
})";
|
||||
|
||||
Reference in New Issue
Block a user