refactor(hyprland): combine directional keybind loop

This commit is contained in:
2026-10-11 14:47:50 -04:00
parent cbe588db2e
commit 2d417b2144

View File

@@ -62,34 +62,30 @@ in
))
# Generate directional keybinds.
(lib.listToAttrs (
map (
lib.concatMap (
{ direction, key }:
{
name = "hyprland-focus-${direction}";
value = {
keys = "SUPER + ${key}";
action = {
kind = "focus";
inherit direction;
[
{
name = "hyprland-focus-${direction}";
value = {
keys = "SUPER + ${key}";
action = {
kind = "focus";
inherit direction;
};
};
};
}
) directions
))
# Generate directional window movement keybinds.
(lib.listToAttrs (
map (
{ direction, key }:
{
name = "hyprland-move-${direction}";
value = {
keys = "SUPER + SHIFT + ${key}";
action = {
kind = "move-window";
inherit direction;
}
{
name = "hyprland-move-${direction}";
value = {
keys = "SUPER + SHIFT + ${key}";
action = {
kind = "move-window";
inherit direction;
};
};
};
}
}
]
) directions
))
];