mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 02:53:55 -05:00
home/desktop: merge hyprland and sway windowManagerBinds
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
This commit is contained in:
parent
74b97332f4
commit
5b8e60d78e
|
@ -14,15 +14,15 @@ in {
|
||||||
extraConfig = let
|
extraConfig = let
|
||||||
moveMonitorBinds =
|
moveMonitorBinds =
|
||||||
lib.attrsets.mapAttrsToList (
|
lib.attrsets.mapAttrsToList (
|
||||||
key: direction: "bind=CONTROL,${key},movecurrentworkspacetomonitor,${direction}"
|
key: direction: "bind=CONTROL,${key},movecurrentworkspacetomonitor,${builtins.substring 0 1 direction}"
|
||||||
)
|
)
|
||||||
cfg.desktop.hyprland.windowManagerBinds;
|
cfg.desktop.windowManagerBinds;
|
||||||
|
|
||||||
moveWindowBinds =
|
moveWindowBinds =
|
||||||
lib.attrsets.mapAttrsToList (
|
lib.attrsets.mapAttrsToList (
|
||||||
key: direction: "bind=,${key},movewindow,${direction}"
|
key: direction: "bind=,${key},movewindow,${builtins.substring 0 1 direction}"
|
||||||
)
|
)
|
||||||
cfg.desktop.hyprland.windowManagerBinds;
|
cfg.desktop.windowManagerBinds;
|
||||||
|
|
||||||
moveWorkspaceBinds = builtins.map (x: "bind=,${toString x},workspace,${toString x}") [1 2 3 4 5 6 7 8 9];
|
moveWorkspaceBinds = builtins.map (x: "bind=,${toString x},workspace,${toString x}") [1 2 3 4 5 6 7 8 9];
|
||||||
in ''
|
in ''
|
||||||
|
|
|
@ -56,9 +56,9 @@ in {
|
||||||
]
|
]
|
||||||
++ builtins.map (x: "$mod SHIFT,${toString x},movetoworkspace,${toString x}") [1 2 3 4 5 6 7 8 9]
|
++ builtins.map (x: "$mod SHIFT,${toString x},movetoworkspace,${toString x}") [1 2 3 4 5 6 7 8 9]
|
||||||
++ builtins.map (x: "$mod,${toString x},workspace,${toString x}") [1 2 3 4 5 6 7 8 9]
|
++ builtins.map (x: "$mod,${toString x},workspace,${toString x}") [1 2 3 4 5 6 7 8 9]
|
||||||
++ lib.attrsets.mapAttrsToList (key: direction: "$mod CONTROL SHIFT,${key},movecurrentworkspacetomonitor,${direction}") cfg.desktop.hyprland.windowManagerBinds
|
++ lib.attrsets.mapAttrsToList (key: direction: "$mod CONTROL SHIFT,${key},movecurrentworkspacetomonitor,${builtins.substring 0 1 direction}") cfg.desktop.windowManagerBinds
|
||||||
++ lib.attrsets.mapAttrsToList (key: direction: "$mod SHIFT,${key},movewindow,${direction}") cfg.desktop.hyprland.windowManagerBinds
|
++ lib.attrsets.mapAttrsToList (key: direction: "$mod SHIFT,${key},movewindow,${builtins.substring 0 1 direction}") cfg.desktop.windowManagerBinds
|
||||||
++ lib.attrsets.mapAttrsToList (key: direction: "$mod,${key},movefocus,${direction}") cfg.desktop.hyprland.windowManagerBinds;
|
++ lib.attrsets.mapAttrsToList (key: direction: "$mod,${key},movefocus,${builtins.substring 0 1 direction}") cfg.desktop.windowManagerBinds;
|
||||||
|
|
||||||
bindm = [
|
bindm = [
|
||||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
|
|
|
@ -124,7 +124,7 @@ in {
|
||||||
"${modifier}+Shift+${key}" = "move ${direction}";
|
"${modifier}+Shift+${key}" = "move ${direction}";
|
||||||
"${modifier}+Control+Shift+${key}" = "move workspace to output ${direction}";
|
"${modifier}+Control+Shift+${key}" = "move workspace to output ${direction}";
|
||||||
})
|
})
|
||||||
cfg.desktop.sway.windowManagerBinds;
|
cfg.desktop.windowManagerBinds;
|
||||||
|
|
||||||
modes = {
|
modes = {
|
||||||
move =
|
move =
|
||||||
|
@ -144,7 +144,7 @@ in {
|
||||||
)
|
)
|
||||||
// lib.attrsets.concatMapAttrs
|
// lib.attrsets.concatMapAttrs
|
||||||
(key: direction: {"${key}" = "move ${direction}";})
|
(key: direction: {"${key}" = "move ${direction}";})
|
||||||
cfg.desktop.sway.windowManagerBinds;
|
cfg.desktop.windowManagerBinds;
|
||||||
|
|
||||||
resize = {
|
resize = {
|
||||||
Escape = "mode default";
|
Escape = "mode default";
|
||||||
|
|
|
@ -131,21 +131,6 @@ in {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
windowManagerBinds = lib.mkOption {
|
|
||||||
description = "Default binds for window management.";
|
|
||||||
default = {
|
|
||||||
down = "d";
|
|
||||||
left = "l";
|
|
||||||
right = "r";
|
|
||||||
up = "u";
|
|
||||||
h = "l";
|
|
||||||
j = "d";
|
|
||||||
k = "u";
|
|
||||||
l = "r";
|
|
||||||
};
|
|
||||||
type = lib.types.attrs;
|
|
||||||
};
|
|
||||||
|
|
||||||
tabletMode = {
|
tabletMode = {
|
||||||
enable = lib.mkEnableOption "Tablet mode for hyprland.";
|
enable = lib.mkEnableOption "Tablet mode for hyprland.";
|
||||||
|
|
||||||
|
@ -163,21 +148,23 @@ in {
|
||||||
default = osConfig.ar.desktop.sway.enable;
|
default = osConfig.ar.desktop.sway.enable;
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
windowManagerBinds = lib.mkOption {
|
windowManagerBinds = lib.mkOption {
|
||||||
description = "Default binds for window management.";
|
description = "Default binds for window management.";
|
||||||
default = {
|
|
||||||
Down = "down";
|
default = {
|
||||||
Left = "left";
|
Down = "down";
|
||||||
Right = "right";
|
Left = "left";
|
||||||
Up = "up";
|
Right = "right";
|
||||||
H = "left";
|
Up = "up";
|
||||||
J = "down";
|
H = "left";
|
||||||
K = "up";
|
J = "down";
|
||||||
L = "right";
|
K = "up";
|
||||||
};
|
L = "right";
|
||||||
type = lib.types.attrs;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type = lib.types.attrs;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue