Skip to content

Instantly share code, notes, and snippets.

@yannbertrand
Created July 16, 2025 21:28
Show Gist options
  • Save yannbertrand/978bfcf5c43a1baa2e1f9734d6a2c72e to your computer and use it in GitHub Desktop.
Save yannbertrand/978bfcf5c43a1baa2e1f9734d6a2c72e to your computer and use it in GitHub Desktop.
.aerospace.toml
# You can use it to add commands that run after login to macOS user session.
# 'start-at-login' needs to be 'true' for 'after-login-command' to work
# Available commands: https://nikitabobko.github.io/AeroSpace/commands
after-login-command = []
# You can use it to add commands that run after AeroSpace startup.
# 'after-startup-command' is run after 'after-login-command'
# Available commands : https://nikitabobko.github.io/AeroSpace/commands
after-startup-command = [
'exec-and-forget borders active_color=0xffe1e3e4 inactive_color=0xff494d64 width=5.0'
]
# Start AeroSpace at login
start-at-login = true
# Possible values: tiles|accordion
default-root-container-layout = 'tiles'
# Possible values: horizontal|vertical|auto
# 'auto' means: wide monitor (anything wider than high) gets horizontal orientation,
# tall monitor (anything higher than wide) gets vertical orientation
default-root-container-orientation = 'auto'
# Mouse follows focus when focused monitor changes
# Drop it from your config, if you don't like this behavior
# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks
# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse
# Fallback value (if you omit the key): on-focused-monitor-changed = []
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
# You can effectively turn off macOS "Hide application" (cmd-h) feature by toggling this flag
# Useful if you don't use this macOS feature, but accidentally hit cmd-h or cmd-alt-h key
# Also see: https://nikitabobko.github.io/AeroSpace/goodies#disable-hide-app
automatically-unhide-macos-hidden-apps = true
# Gaps between windows (inner-*) and between monitor edges (outer-*).
# Possible values:
# - Constant: gaps.outer.top = 8
# - Per monitor: gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24]
# In this example, 24 is a default value when there is no match.
# Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'.
# See:
# https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors
[gaps]
inner.horizontal = 0
inner.vertical = 0
outer.left = 0
outer.bottom = 0
outer.top = 0
outer.right = 0
# 'main' binding mode declaration
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
# 'main' binding mode must be always presented
# Fallback value (if you omit the key): mode.main.binding = {}
[mode.main.binding]
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
# cmd-left = 'focus left'
# cmd-down = 'focus down'
# cmd-up = 'focus up'
# cmd-right = 'focus right'
# See: https://nikitabobko.github.io/AeroSpace/commands#move
# cmd-shift-left = 'move left'
# cmd-shift-down = 'move down'
# cmd-shift-up = 'move up'
# cmd-shift-right = 'move right'
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
ctrl-1 = 'workspace 1'
ctrl-2 = 'workspace 2'
ctrl-3 = 'workspace 3'
ctrl-4 = 'workspace 4'
ctrl-5 = 'workspace 5'
ctrl-6 = 'workspace 6'
ctrl-7 = 'workspace 7'
ctrl-8 = 'workspace 8'
ctrl-9 = 'workspace 9'
ctrl-0 = 'workspace 10'
# Deactivated macOS shortcuts in Preferences > Keyboard > Keyboard Shortcuts... > Mission Control >
# Mission Control & Application windows
ctrl-left = 'workspace prev --wrap-around'
ctrl-right = 'workspace next --wrap-around'
# Deactivated macOS shortcuts in Preferences > Keyboard > Keyboard Shortcuts... > Mission Control > Mission Control >
# Move left a space & Move right a space
ctrl-up = 'focus --boundaries-action wrap-around-the-workspace left'
ctrl-down = 'focus --boundaries-action wrap-around-the-workspace right'
ctrl-alt-left = 'focus-monitor main'
ctrl-alt-right = 'focus-monitor secondary'
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
ctrl-shift-1 = 'move-node-to-workspace 1 --focus-follows-window'
ctrl-shift-2 = 'move-node-to-workspace 2 --focus-follows-window'
ctrl-shift-3 = 'move-node-to-workspace 3 --focus-follows-window'
ctrl-shift-4 = 'move-node-to-workspace 4 --focus-follows-window'
ctrl-shift-5 = 'move-node-to-workspace 5 --focus-follows-window'
ctrl-shift-6 = 'move-node-to-workspace 6 --focus-follows-window'
ctrl-shift-7 = 'move-node-to-workspace 7 --focus-follows-window'
ctrl-shift-8 = 'move-node-to-workspace 8 --focus-follows-window'
ctrl-shift-9 = 'move-node-to-workspace 9 --focus-follows-window'
ctrl-shift-0 = 'move-node-to-workspace 10 --focus-follows-window'
[workspace-to-monitor-force-assignment]
1 = 'secondary'
2 = 'secondary'
3 = 'secondary'
4 = 'main'
5 = 'main'
6 = 'main'
7 = 'secondary'
8 = 'main'
9 = 'main'
[[on-window-detected]]
if.app-id = 'org.mozilla.firefoxdeveloperedition'
run = ['move-node-to-workspace 1 --focus-follows-window']
[[on-window-detected]]
if.app-id = 'com.microsoft.VSCode'
run = ['move-node-to-workspace 2 --focus-follows-window']
[[on-window-detected]]
if.app-id = 'com.googlecode.iterm2'
run = ['move-node-to-workspace 3 --focus-follows-window']
[[on-window-detected]]
if.app-id = 'org.ferdium.ferdium-app'
run = ['move-node-to-workspace 5 --focus-follows-window']
[[on-window-detected]]
if.app-id = 'com.google.Chrome'
run = ['move-node-to-workspace 6 --focus-follows-window']
[[on-window-detected]]
if.app-id = 'org.m0k.transmission'
run = ['layout floating', 'move-node-to-workspace 8 --focus-follows-window']
[[on-window-detected]]
if.app-id = 'ch.protonvpn.mac'
run = ['layout floating', 'move-node-to-workspace 8 --focus-follows-window']
[[on-window-detected]]
if.app-id = 'com.automattic.beeper.desktop'
run = ['move-node-to-workspace 9 --focus-follows-window']
[[on-window-detected]]
if.app-id = 'com.apple.Music'
run = ['move-node-to-workspace 0 --focus-follows-window']
[[on-window-detected]]
if.app-id = 'com.apple.podcasts'
run = ['move-node-to-workspace 0 --focus-follows-window']
[[on-window-detected]]
if.app-id = 'com.apple.finder'
run = 'layout floating'
[[on-window-detected]]
if.app-id = 'ch.sudo.cyberduck'
run = 'layout floating'
[[on-window-detected]]
if.app-id = 'com.apple.Notes'
run = 'layout floating'
[[on-window-detected]]
if.app-id = 'com.tinyapp.TablePlus'
run = 'layout floating'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment