aerospace-config
Complete AeroSpace tiling window manager configuration assistant for macOS. Use for any AeroSpace configuration task including keybindings, workspace management, window rules, layouts (BSP, columns, rows, accordion), focus behavior, gaps, floating windows, app-specific settings, exec commands, or any window management customization. Also use for debugging and troubleshooting AeroSpace issues including log inspection, window state analysis, and diagnosing layout problems. This skill fetches fresh documentation for each request to ensure accurate, up-to-date guidance.
$ 安裝
git clone https://github.com/alexfazio/cc-skills /tmp/cc-skills && cp -r /tmp/cc-skills/skills/aerospace-config ~/.claude/skills/cc-skills// tip: Run this command in your terminal to install the skill
name: aerospace-config description: Complete AeroSpace tiling window manager configuration assistant for macOS. Use for any AeroSpace configuration task including keybindings, workspace management, window rules, layouts (BSP, columns, rows, accordion), focus behavior, gaps, floating windows, app-specific settings, exec commands, or any window management customization. Also use for debugging and troubleshooting AeroSpace issues including log inspection, window state analysis, and diagnosing layout problems. This skill fetches fresh documentation for each request to ensure accurate, up-to-date guidance.
AeroSpace Configuration Assistant
This skill provides comprehensive assistance for configuring AeroSpace, a tiling window manager for macOS. AeroSpace uses TOML for configuration and offers extensive customization for keyboard-driven window management, workspaces, layouts, and window behavior.
Configuration Location
Config File: /Users/alex/.config/aerospace/aerospace.toml
Alternative locations: ~/.aerospace.toml
Core Principles
ALWAYS Follow This Workflow
- Read Current Config: Use Read tool to examine existing configuration
- Fetch Documentation: Use WebFetch to get current documentation for the specific feature
- Research Thoroughly: Check multiple doc pages if needed for complex features
- Implement Carefully: Preserve existing config, validate TOML syntax
- Explain Clearly: Document what changed and why
- Guide Testing: Explain how to reload config (
aerospace reload-config)
Documentation Strategy
Never embed documentation text. Always use WebFetch to retrieve current information from the AeroSpace documentation.
AeroSpace documentation is comprehensive and continuously updated. The configuration system supports many options across window management, keybindings, and layouts.
Full Configuration Capabilities
AeroSpace supports configuration across these comprehensive areas. For each request, fetch the relevant documentation:
1. Getting Started & Overview
- Installation & Setup: Initial configuration, first-time setup
- Default Config: Understanding the default configuration
2. Keybindings & Modes
- Key Bindings: Main mode, custom modes, key syntax
- Key Syntax: Modifier keys, key names, key combinations
3. Window Management
- Tree Structure: Understanding the window tree paradigm
- Layouts: BSP (Binary Space Partitioning), columns, rows, accordion, tiles
- Floating Windows: Float rules, floating toggle
4. Workspaces & Monitors
- Workspaces: Workspace configuration, assignment, switching
- Multiple Monitors: Monitor assignment, workspace-to-monitor mapping
5. Application-Specific Rules
- Window Detection Callbacks: on-window-detected, app-specific behavior
- App Identifiers: Bundle IDs, window titles for rules
6. Visual Appearance
- Gaps: Inner gaps, outer gaps, per-workspace gaps
7. Commands Reference
- All Commands: Complete command reference for keybindings and exec
- Individual Commands: (fetch specific command pages as needed)
- https://nikitabobko.github.io/AeroSpace/commands#focus
- https://nikitabobko.github.io/AeroSpace/commands#move
- https://nikitabobko.github.io/AeroSpace/commands#resize
- https://nikitabobko.github.io/AeroSpace/commands#workspace
- https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
- https://nikitabobko.github.io/AeroSpace/commands#layout
- https://nikitabobko.github.io/AeroSpace/commands#split
- https://nikitabobko.github.io/AeroSpace/commands#join-with
- https://nikitabobko.github.io/AeroSpace/commands#flatten-workspace-tree
- https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget
- https://nikitabobko.github.io/AeroSpace/commands#mode
- https://nikitabobko.github.io/AeroSpace/commands#reload-config
8. Configuration Options
- TOML Configuration: Full config reference
- Config Options Reference: All available configuration options
9. Advanced Features
- Exec Commands: Running shell commands, exec-and-forget
- Focus Behavior: Focus follows window, mouse handling
- Normalization: Container normalization options
10. Troubleshooting & Debugging
- Troubleshooting Guide: Common issues, debugging
- Config Validation: Checking config syntax
- Logs & Debugging: Finding logs, debug information
Configuration File Structure
AeroSpace configs use TOML format:
# Start AeroSpace at login
start-at-login = true
# Gaps between windows
[gaps]
inner.horizontal = 10
inner.vertical = 10
outer.left = 10
outer.bottom = 10
outer.top = 10
outer.right = 10
# Main mode keybindings
[mode.main.binding]
alt-h = 'focus left'
alt-j = 'focus down'
alt-k = 'focus up'
alt-l = 'focus right'
# Workspace keybindings
alt-1 = 'workspace 1'
alt-2 = 'workspace 2'
# Move windows to workspaces
alt-shift-1 = 'move-node-to-workspace 1'
alt-shift-2 = 'move-node-to-workspace 2'
# Layout commands
alt-slash = 'layout tiles horizontal vertical'
alt-comma = 'layout accordion horizontal vertical'
# Window detection callbacks
[[on-window-detected]]
if.app-id = 'com.apple.finder'
run = 'layout floating'
Research Process for Each Request
When user requests any configuration change:
- Identify Category: Determine which configuration area(s) are involved
- Fetch Core Docs: Get main documentation page for that category
- Fetch Specifics: If needed, get specific command reference or examples
- Check Commands: If keybinding involves commands, fetch command documentation
- Verify Syntax: Check TOML syntax and available options
- Cross-Reference: Look at related features that might enhance the solution
Implementation Guidelines
Code Quality
- Use clear section organization and comments
- Follow TOML best practices
- Validate syntax before suggesting
- Use consistent indentation
Config Organization
- Group related settings together (gaps, keybindings, rules)
- Add section comments for clarity
- Preserve user's existing organizational structure
- Keep keybindings logically grouped by function
Error Prevention
- Check for config file existence before editing
- Validate that TOML syntax is correct
- Ensure keybinding commands exist
- Verify app bundle IDs for window rules
User Guidance
- Explain what each change does
- Link to relevant documentation pages
- Suggest how to test changes (
aerospace reload-config) - Offer related enhancements when appropriate
- Mention keyboard shortcuts in clear format (alt-shift-1)
Common Tasks Quick Reference
Testing Changes
aerospace reload-config
Finding App Bundle IDs
Method 1: Using osascript (preferred for known app names)
osascript -e 'id of app "AppName"'
Example:
osascript -e 'id of app "Finder"'
# Returns: com.apple.finder
Method 2: List all running apps
aerospace list-apps
Method 3: Using mdls on the app bundle
mdls -name kMDItemCFBundleIdentifier /Applications/AppName.app
Listing Windows
List all windows:
aerospace list-windows --all
List windows in specific workspace:
aerospace list-windows --workspace TER
List windows as JSON (for detailed analysis):
aerospace list-windows --all --json
Filter windows by app (example for Ghostty):
aerospace list-windows --all --json | python3 -c "import json,sys; data=json.load(sys.stdin); filtered=[w for w in data if 'AppName' in w.get('app-name','')]; print(json.dumps(filtered, indent=2))"
List active workspaces:
aerospace list-workspaces --monitor all --empty no
Debugging & Log Inspection
When troubleshooting issues (window resizing, layout problems, unexpected behavior), use these debugging techniques:
Check if AeroSpace is Running
pgrep -l AeroSpace && echo "AeroSpace is running" || echo "AeroSpace is NOT running"
View System Logs
AeroSpace logs to the macOS unified logging system. Use the log command to retrieve logs:
Get recent AeroSpace logs (last 30 minutes):
/usr/bin/log show --predicate 'processImagePath CONTAINS "AeroSpace"' --last 30m --info --debug | tail -200
Get logs for specific time period:
/usr/bin/log show --predicate 'processImagePath CONTAINS "AeroSpace"' --last 10m --style compact
Stream live logs (useful during testing):
/usr/bin/log stream --predicate 'processImagePath CONTAINS "AeroSpace"' --style compact
Note: Use /usr/bin/log with full path to avoid shell interpretation issues.
Debug Windows Session
To debug a specific problematic window:
- Start debug session:
aerospace debug-windows
-
Focus the problematic window
-
Run the command again to get results:
aerospace debug-windows
Common Debugging Scenarios
Window not floating/tiling as expected:
- List windows to see current state:
aerospace list-windows --workspace WORKSPACE_NAME --json - Check if on-window-detected rule is correct
- Note: Rules only apply to NEW windows - existing windows keep their state
Layout issues after config change:
- Reload config:
aerospace reload-config - Close and reopen the problematic app for new rules to apply
- Check logs for any errors
App windows behaving unexpectedly:
- Verify app bundle ID:
osascript -e 'id of app "AppName"' - List all windows from that app to see how AeroSpace perceives them
- Some apps (like Ghostty) report tabs as separate windows - this is a known macOS limitation
Debug Mode
aerospace enable-debug-mode
Remember
- Never paste documentation - always use WebFetch
- Always read config first - understand existing setup
- Research thoroughly - fetch multiple doc pages if needed
- Explain clearly - user should understand the changes
- Link resources - provide documentation URLs for reference
- Test guidance - explain how to verify changes work
AeroSpace is actively developed. When in doubt, fetch the documentation.
Repository
