diff --git a/hosts/darwin/home-default.nix b/hosts/darwin/home-default.nix index 6f997d8..63ae791 100644 --- a/hosts/darwin/home-default.nix +++ b/hosts/darwin/home-default.nix @@ -17,6 +17,7 @@ ../../modules/claude-code.nix ../../modules/tex.nix ../../modules/fonts.nix + ../../modules/aerospace.nix ]; nixpkgs.config.allowUnfree = true; @@ -209,10 +210,10 @@ }; }; - launchd.agents.rectangle = { + launchd.agents.aerospace = { enable = true; config = { - ProgramArguments = [ "/Applications/Rectangle.app/Contents/MacOS/Rectangle" ]; + ProgramArguments = [ "/Applications/AeroSpace.app/Contents/MacOS/AeroSpace" ]; RunAtLoad = true; KeepAlive = false; }; diff --git a/modules/aerospace.nix b/modules/aerospace.nix new file mode 100644 index 0000000..94e3374 --- /dev/null +++ b/modules/aerospace.nix @@ -0,0 +1,62 @@ +{ config, pkgs, lib, ... }: + +{ + home.file.".aerospace.toml".text = '' + # AeroSpace configuration + # Default to floating windows (like Hyprland) + + start-at-login = true + + # Make all new windows floating by default + [[on-window-detected]] + run = ['layout floating'] + + [mode.main.binding] + # Toggle between floating and tiling + alt-enter = 'layout floating tiling' + + # Window focus (vim-style) + alt-h = 'focus left' + alt-j = 'focus down' + alt-k = 'focus up' + alt-l = 'focus right' + + # Move windows + alt-shift-h = 'move left' + alt-shift-j = 'move down' + alt-shift-k = 'move up' + alt-shift-l = 'move right' + + # Resize + alt-minus = 'resize smart -50' + alt-equal = 'resize smart +50' + + # Workspaces + alt-1 = 'workspace 1' + alt-2 = 'workspace 2' + alt-3 = 'workspace 3' + alt-4 = 'workspace 4' + alt-5 = 'workspace 5' + alt-6 = 'workspace 6' + alt-7 = 'workspace 7' + alt-8 = 'workspace 8' + alt-9 = 'workspace 9' + + # Move window to workspace + alt-shift-1 = 'move-node-to-workspace 1' + alt-shift-2 = 'move-node-to-workspace 2' + alt-shift-3 = 'move-node-to-workspace 3' + alt-shift-4 = 'move-node-to-workspace 4' + alt-shift-5 = 'move-node-to-workspace 5' + alt-shift-6 = 'move-node-to-workspace 6' + alt-shift-7 = 'move-node-to-workspace 7' + alt-shift-8 = 'move-node-to-workspace 8' + alt-shift-9 = 'move-node-to-workspace 9' + + # Fullscreen + alt-f = 'fullscreen' + + # Close window + alt-q = 'close' + ''; +} diff --git a/modules/homebrew.nix b/modules/homebrew.nix index 45e959d..6ef80e9 100644 --- a/modules/homebrew.nix +++ b/modules/homebrew.nix @@ -30,7 +30,7 @@ "microsoft-word" "microsoft-excel" "balenaetcher" - "rectangle" + "aerospace" "maccy" "iina" "hiddenbar" @@ -48,7 +48,7 @@ "the-unarchiver" ]; taps = [ - # Additional repositories if needed + "nikitabobko/tap" ]; };