add aerospace

This commit is contained in:
Yan Lin 2026-01-08 08:08:56 +01:00
parent 1b186073d7
commit 5892509afb
3 changed files with 67 additions and 4 deletions

View file

@ -17,6 +17,7 @@
../../modules/claude-code.nix ../../modules/claude-code.nix
../../modules/tex.nix ../../modules/tex.nix
../../modules/fonts.nix ../../modules/fonts.nix
../../modules/aerospace.nix
]; ];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -209,10 +210,10 @@
}; };
}; };
launchd.agents.rectangle = { launchd.agents.aerospace = {
enable = true; enable = true;
config = { config = {
ProgramArguments = [ "/Applications/Rectangle.app/Contents/MacOS/Rectangle" ]; ProgramArguments = [ "/Applications/AeroSpace.app/Contents/MacOS/AeroSpace" ];
RunAtLoad = true; RunAtLoad = true;
KeepAlive = false; KeepAlive = false;
}; };

62
modules/aerospace.nix Normal file
View file

@ -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'
'';
}

View file

@ -30,7 +30,7 @@
"microsoft-word" "microsoft-word"
"microsoft-excel" "microsoft-excel"
"balenaetcher" "balenaetcher"
"rectangle" "aerospace"
"maccy" "maccy"
"iina" "iina"
"hiddenbar" "hiddenbar"
@ -48,7 +48,7 @@
"the-unarchiver" "the-unarchiver"
]; ];
taps = [ taps = [
# Additional repositories if needed "nikitabobko/tap"
]; ];
}; };