Skip to content

Instantly share code, notes, and snippets.

@EReaso
Created March 30, 2026 03:18
Show Gist options
  • Select an option

  • Save EReaso/9bef982db1790a2d80f0f4a4b1f8b7a7 to your computer and use it in GitHub Desktop.

Select an option

Save EReaso/9bef982db1790a2d80f0f4a4b1f8b7a7 to your computer and use it in GitHub Desktop.
Aerospace Config, WIP
# 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 = [
# JankyBorders has a built-in detection of already running process,
# so it won't be run twice on AeroSpace restart
]
# Start AeroSpace at login
start-at-login = true
# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
enable-normalization-flatten-containers = true
enable-normalization-opposite-orientation-for-nested-containers = true
# See: https://nikitabobko.github.io/AeroSpace/guide#layouts
# The 'accordion-padding' specifies the size of accordion padding
# You can set 0 to disable the padding feature
accordion-padding = 10
# 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']
#on-focus-changed = 'move-mouse window-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/goodness#disable-hide-app
automatically-unhide-macos-hidden-apps = true
# Possible values: (qwerty|dvorak)
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
[key-mapping]
preset = 'qwerty'
# 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 = 5
inner.vertical = 5
outer.left = 5
outer.bottom = 5
outer.top = 5
outer.right = 5
# See https://nikitabobko.github.io/AeroSpace/guide#exec-env-vars
[exec] # Again, you don't need to copy all config sections to your config.
inherit-env-vars = true # If you don't touch "exec" section,
[exec.env-vars] # it will fallback to "default-config.toml"
PATH = '/opt/homebrew/bin:/opt/homebrew/sbin:${PATH}'
# When Minecraft/Java windows appear, switch to a minimal mode so game keys pass through.
[[on-window-detected]]
if.app-name-regex-substring = 'minecraft|java'
run = ['layout floating', 'mode game']
# 'main' binding mode declaration
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
# 'main' binding mode must be always presented
[mode.main.binding]
# All possible keys:
# - Letters. a, b, c, ..., z
# - Numbers. 0, 1, 2, ..., 9
# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
# - F-keys. f1, f2, ..., f20
# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick,
# leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab
# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual,
# keypadMinus, keypadMultiply, keypadPlus
# - Arrows. left, down, up, right
# All possible modifiers: cmd, alt, ctrl, shift
# All possible commands: https://nikitabobko.github.io/AeroSpace/commands
# You can uncomment this line to open up terminal with cmd + enter shortcut
# See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget
# cmd-enter = 'exec-and-forget open -n /System/Applications/Utilities/Terminal.app'
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
#cmd-slash = 'layout accordion horizontal vertical'
#cmd-backslash = 'layout tiles horizontal vertical'
# alt-enter = 'exec-and-forget open -n /Applications/Alacritty.app' # use Super + N to open new alacritty terminal
#cmd-enter = 'macos-native-fullscreen'
#cmd-q = 'close'
#alt-ctrl-e = 'macos-native-minimize'
#alt-m = 'fullscreen'
alt-left = 'workspace --wrap-around prev'
alt-right = 'workspace --wrap-around next'
alt-shift-left = 'move-workspace-to-monitor left'
alt-shift-right = 'move-workspace-to-monitor right'
alt-shift-up = 'move-workspace-to-monitor up'
alt-shift-down = 'move-workspace-to-monitor down'
alt-ctrl-left = 'move-node-to-monitor left'
alt-ctrl-right = 'move-node-to-monitor right'
alt-ctrl-up = 'move-node-to-monitor up'
alt-ctrl-down = 'move-node-to-monitor down'
alt-shift-c = 'reload-config'
alt-shift-f = 'layout floating tiling'
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
alt-shift-m = 'mode manage'
alt-shift-r = 'mode resize'
alt-shift-x = 'mode manage'
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
alt-h = 'focus left'
alt-j = 'focus down'
alt-k = 'focus up'
alt-l = 'focus right'
# See: https://nikitabobko.github.io/AeroSpace/commands#move
alt-shift-h = 'move left'
alt-shift-j = 'move down'
alt-shift-k = 'move up'
alt-shift-l = 'move right'
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
alt-backtick = 'workspace 10'
alt-1 = 'workspace 1'
alt-2 = 'workspace 2'
alt-3 = 'workspace 3'
alt-q = 'workspace 4'
alt-w = 'workspace 5'
alt-e = 'workspace 6'
alt-a = 'workspace 7'
alt-s = 'workspace 8'
alt-d = 'workspace 9'
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
# cmd-shift-1 = 'move-node-to-workspace 1'
# cmd-shift-2 = 'move-node-to-workspace 2'
# cmd-shift-3 = 'move-node-to-workspace 3'
# cmd-shift-4 = 'move-node-to-workspace 4'
# cmd-shift-5 = 'move-node-to-workspace 5'
# cmd-shift-6 = 'move-node-to-workspace 6'
# cmd-shift-7 = 'move-node-to-workspace 7'
# cmd-shift-8 = 'move-node-to-workspace 8'
# cmd-shift-9 = 'move-node-to-workspace 9'
# cmd-shift-0 = 'move-node-to-workspace 10'
alt-shift-backtick = 'move-node-to-workspace 10'
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-q = 'move-node-to-workspace 4'
alt-shift-w = 'move-node-to-workspace 5'
alt-shift-e = 'move-node-to-workspace 6'
alt-shift-a = 'move-node-to-workspace 7'
alt-shift-s = 'move-node-to-workspace 8'
alt-shift-d = 'move-node-to-workspace 9'
ctrl-alt-shift-backtick = ['move-node-to-workspace 10', 'workspace 10']
ctrl-alt-shift-1 = ['move-node-to-workspace 1', 'workspace 1']
ctrl-alt-shift-2 = ['move-node-to-workspace 2', 'workspace 2']
ctrl-alt-shift-3 = ['move-node-to-workspace 3', 'workspace 3']
ctrl-alt-shift-q = ['move-node-to-workspace 4', 'workspace 4']
ctrl-alt-shift-w = ['move-node-to-workspace 5', 'workspace 5']
ctrl-alt-shift-e = ['move-node-to-workspace 6', 'workspace 6']
ctrl-alt-shift-a = ['move-node-to-workspace 7', 'workspace 7']
ctrl-alt-shift-s = ['move-node-to-workspace 8', 'workspace 8']
ctrl-alt-shift-d = ['move-node-to-workspace 9', 'workspace 9']
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
alt-tab = 'workspace-back-and-forth'
# See: https://nikitabobko.github.io/AeroSpace/commands#move-workspace-to-monitor
alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
# 'manage' binding mode declaration.
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
[mode.manage.binding]
esc = 'mode main'
enter = 'mode main'
c = ['reload-config', 'mode main']
r = ['flatten-workspace-tree', 'mode main'] # reset layout
v = ['flatten-workspace-tree', 'layout vertical', 'mode main'] # reset + force vertical layout
#s = ['layout sticky tiling', 'mode main'] # sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2
f = [
'layout floating tiling',
'mode main',
] # Toggle between floating and tiling layout
#backspace = ['close-all-windows-but-current', 'mode main']
h = ['join-with left', 'mode main']
j = ['join-with down', 'mode main']
k = ['join-with up', 'mode main']
l = ['join-with right', 'mode main']
[mode.resize.binding]
h = 'resize width -100'
j = 'resize height +100'
k = 'resize height -100'
l = 'resize width +100'
enter = 'mode main'
esc = 'mode main'
[mode.game.binding]
# Exit game mode with a hard-to-hit combo
alt-g = 'mode main'
[workspace-to-monitor-force-assignment]
1 = 'main'
2 = 'main'
3 = 'main'
4 = 'built-in'
5 = 'built-in'
6 = 'built-in'
7 = 'dell'
8 = 'dell'
9 = 'dell'
10 = 'built-in'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment