refactor(hyprland): combine directional keybind loop
This commit is contained in:
@@ -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
|
||||
))
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user