diff --git a/home/roles/aerospace/default.nix b/home/roles/aerospace/default.nix index 127f11d..985f8e9 100644 --- a/home/roles/aerospace/default.nix +++ b/home/roles/aerospace/default.nix @@ -76,13 +76,19 @@ in home.packages = [ pkgs.aerospace ] ++ optionals cfg.autoraise.enable [ pkgs.autoraise ]; - # Configure aerospace with user settings + # Enable and configure aerospace + programs.aerospace.enable = true; programs.aerospace.userSettings = mkMerge [ # Default configuration with leader key substitution { + # Disable normalizations for i3-like behavior + enable-normalization-flatten-containers = false; + enable-normalization-opposite-orientation-for-nested-containers = false; + mode.main.binding = { - "${cfg.leader}-slash" = "layout tiles horizontal vertical"; - "${cfg.leader}-comma" = "layout accordion horizontal vertical"; + "${cfg.leader}-w" = "layout accordion horizontal"; # tabbed + "${cfg.leader}-s" = "layout accordion vertical"; # stacking + "${cfg.leader}-e" = "layout tiles horizontal vertical"; # tiles, toggles orientation "${cfg.leader}-shift-q" = "close"; "${cfg.leader}-shift-f" = "fullscreen"; "${cfg.leader}-h" = "focus left"; @@ -93,8 +99,7 @@ in "${cfg.leader}-shift-j" = "move down"; "${cfg.leader}-shift-k" = "move up"; "${cfg.leader}-shift-l" = "move right"; - "${cfg.leader}-minus" = "resize smart -50"; - "${cfg.leader}-equal" = "resize smart +50"; + "${cfg.leader}-r" = "mode resize"; "${cfg.leader}-1" = "workspace 1"; "${cfg.leader}-2" = "workspace 2"; "${cfg.leader}-3" = "workspace 3"; @@ -148,6 +153,20 @@ in "${cfg.leader}-p" = "mode passthrough"; }; + # Resize mode: For window resizing operations + mode.resize.binding = { + h = "resize width -50"; + j = "resize height +50"; + k = "resize height -50"; + l = "resize width +50"; + + minus = "resize smart -50"; + equal = "resize smart +50"; + + esc = "mode main"; + enter = "mode main"; + }; + # Service mode: For deliberate aerospace window management operations mode.service.binding = { esc = ["reload-config" "mode main"];