mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 02:13: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
|
||||
moveMonitorBinds =
|
||||
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 =
|
||||
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];
|
||||
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,${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 SHIFT,${key},movewindow,${direction}") cfg.desktop.hyprland.windowManagerBinds
|
||||
++ lib.attrsets.mapAttrsToList (key: direction: "$mod,${key},movefocus,${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,${builtins.substring 0 1 direction}") cfg.desktop.windowManagerBinds
|
||||
++ lib.attrsets.mapAttrsToList (key: direction: "$mod,${key},movefocus,${builtins.substring 0 1 direction}") cfg.desktop.windowManagerBinds;
|
||||
|
||||
bindm = [
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
|
|
|
@ -124,7 +124,7 @@ in {
|
|||
"${modifier}+Shift+${key}" = "move ${direction}";
|
||||
"${modifier}+Control+Shift+${key}" = "move workspace to output ${direction}";
|
||||
})
|
||||
cfg.desktop.sway.windowManagerBinds;
|
||||
cfg.desktop.windowManagerBinds;
|
||||
|
||||
modes = {
|
||||
move =
|
||||
|
@ -144,7 +144,7 @@ in {
|
|||
)
|
||||
// lib.attrsets.concatMapAttrs
|
||||
(key: direction: {"${key}" = "move ${direction}";})
|
||||
cfg.desktop.sway.windowManagerBinds;
|
||||
cfg.desktop.windowManagerBinds;
|
||||
|
||||
resize = {
|
||||
Escape = "mode default";
|
||||
|
|
|
@ -131,21 +131,6 @@ in {
|
|||
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 = {
|
||||
enable = lib.mkEnableOption "Tablet mode for hyprland.";
|
||||
|
||||
|
@ -163,9 +148,11 @@ in {
|
|||
default = osConfig.ar.desktop.sway.enable;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
};
|
||||
|
||||
windowManagerBinds = lib.mkOption {
|
||||
description = "Default binds for window management.";
|
||||
|
||||
default = {
|
||||
Down = "down";
|
||||
Left = "left";
|
||||
|
@ -176,10 +163,10 @@ in {
|
|||
K = "up";
|
||||
L = "right";
|
||||
};
|
||||
|
||||
type = lib.types.attrs;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
easyeffects = {
|
||||
|
|
Loading…
Reference in a new issue