feat(hyprland): add directional focus binds

This commit was merged in pull request #150.
This commit is contained in:
2026-10-11 12:58:56 -04:00
parent 0bf5ebae87
commit a2fc568704
2 changed files with 71 additions and 16 deletions

View File

@@ -11,7 +11,10 @@
lib.all (
entry:
(entry.value.action.kind == "exec" && entry.value.action.command != null)
|| (entry.value.action.kind == "focus-workspace" && entry.value.action.workspace != null)
|| (
entry.value.action.kind == "focus"
&& lib.xor (entry.value.action.direction != null) (entry.value.action.workspace != null)
)
) entries;
message = "Desktop keybind actions must set the fields their kind requires.";
}
@@ -33,7 +36,7 @@
description = "Selects the keybind action kind.";
type = lib.types.enum [
"exec"
"focus-workspace"
"focus"
];
};
@@ -44,8 +47,22 @@
example = "ghostty";
};
direction = lib.mkOption {
description = "Direction focused by a focus keybind.";
type = lib.types.nullOr (
lib.types.enum [
"down"
"left"
"right"
"up"
]
);
default = null;
example = "left";
};
workspace = lib.mkOption {
description = "Workspace focused by a focus-workspace keybind.";
description = "Workspace focused by a focus keybind.";
type = lib.types.nullOr lib.types.int;
default = null;
example = 1;