nix/config/aerospace/aerospace.toml
2026-02-04 00:01:10 -06:00

208 lines
7.1 KiB
TOML

config-version = 2
start-at-login = false
after-startup-command = [
"workspace 10",
"workspace-back-and-forth"
]
persistent-workspaces = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
enable-normalization-flatten-containers = false
enable-normalization-opposite-orientation-for-nested-containers = false
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
exec-on-workspace-change = ['~/dotfiles/bin/path-shim',
'sketchybar --trigger aerospace_workspace_changed FOCUSED_WORKSPACE=$AEROSPACE_FOCUSED_WORKSPACE PREV_WORKSPACE=$AEROSPACE_PREV_WORKSPACE && aerospace-scratchpad hook pull-window $AEROSPACE_PREV_WORKSPACE $AEROSPACE_FOCUSED_WORKSPACE'
]
on-focus-changed = [
# 'move-mouse window-lazy-center',
'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger front_app_switched',
'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger update_windows'
]
[gaps]
inner.horizontal = [{ monitor.'^built-in retina display$' = 15 }, 15]
inner.vertical = [{ monitor.'^built-in retina display$' = 15 }, 15]
outer.left = [{ monitor.'^built-in retina display$' = 15 }, 15]
outer.right = [{ monitor.'^built-in retina display$' = 15 }, 15]
outer.bottom = [{ monitor.'^built-in retina display$' = 15 }, 15]
outer.top = [{ monitor.'^built-in retina display$' = 15 }, 50]
[mode.main.binding]
alt-enter = 'exec-and-forget open -na Ghostty'
# alt-p = 'exec-and-forget ~/dotfiles/bin/open-music'
alt-m = 'exec-and-forget ~/dotfiles/bin/open-mail'
alt-tab = 'workspace-back-and-forth'
alt-h = 'focus --boundaries-action wrap-around-the-workspace left'
alt-j = 'focus --boundaries-action wrap-around-the-workspace down'
alt-k = 'focus --boundaries-action wrap-around-the-workspace up'
alt-l = 'focus --boundaries-action wrap-around-the-workspace right'
alt-shift-h = 'move --boundaries all-monitors-outer-frame left'
alt-shift-j = 'move --boundaries all-monitors-outer-frame down'
alt-shift-k = 'move --boundaries all-monitors-outer-frame up'
alt-shift-l = 'move --boundaries all-monitors-outer-frame right'
alt-v = 'split vertical'
alt-shift-v = 'split horizontal'
alt-z = 'fullscreen'
alt-s = 'layout v_accordion'
alt-t = 'layout h_accordion'
alt-e = 'layout tiles horizontal vertical'
alt-space = 'layout floating tiling'
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'
alt-0 = '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-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'
alt-shift-0 = 'move-node-to-workspace 10'
alt-shift-semicolon = [
'mode service',
'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger send_message MESSAGE=SERVICE_MODE HOLD=true'
]
alt-r = [
'mode resize',
'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger send_message MESSAGE=RESIZE_MODE HOLD=true'
]
alt-g = [
'mode group',
'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger send_message MESSAGE=GROUP_MODE HOLD=true'
]
cmd-ctrl-1 = "exec-and-forget ~/dotfiles/bin/path-shim aerospace-scratchpad show Finder"
[mode.resize.binding]
h = 'resize width -50'
j = 'resize height +50'
k = 'resize height -50'
l = 'resize width +50'
esc = [
'mode main',
'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger hide_message'
]
enter = [
'mode main',
'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger hide_message'
]
[mode.service.binding]
esc = [
'reload-config',
'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger hide_message',
'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --reload',
'mode main',
]
r = ['flatten-workspace-tree']
backspace = ['close-all-windows-but-current']
p = [
'exec-and-forget ~/dotfiles/bin/presentation-mode on',
'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --bar height=0',
'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger hide_message',
'mode main'
]
shift-p = [
'exec-and-forget ~/dotfiles/bin/presentation-mode off',
'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --bar height=30',
'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger hide_message',
'mode main'
]
[mode.group.binding]
# Join with direction + make tabbed (h_accordion for horizontal, v_accordion for vertical)
h = ['join-with left', 'layout h_accordion']
j = ['join-with down', 'layout v_accordion']
k = ['join-with up', 'layout v_accordion']
l = ['join-with right', 'layout h_accordion']
# Layout options (apply to current container)
t = 'layout h_accordion'
s = 'layout v_accordion'
e = 'layout tiles horizontal vertical'
# Exit group mode
esc = [
'mode main',
'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger hide_message'
]
enter = [
'mode main',
'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger hide_message'
]
[[on-window-detected]]
if.app-id = 'com.apple.finder'
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.apple.ActivityMonitor'
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.openai.chat'
run = ['move-node-to-workspace 3', 'layout h_accordion']
[[on-window-detected]]
if.app-id = 'com.anthropic.claudefordesktop'
run = ['move-node-to-workspace 3', 'layout h_accordion']
[[on-window-detected]]
if.app-id = 'com.1password.1password'
run = ['move-node-to-workspace 5']
[[on-window-detected]]
if.app-id = 'com.apple.MobileSMS'
run = ['move-node-to-workspace 5']
[[on-window-detected]]
if.app-id = 'com.spotify.client'
run = ['move-node-to-workspace 7']
[[on-window-detected]]
if.app-id = 'com.mitchellh.ghostty'
if.window-title-regex-substring = 'Music'
check-further-callbacks = true
run = ['move-node-to-workspace 7']
[[on-window-detected]]
if.app-id = 'com.apple.mail'
run = ['move-node-to-workspace 8']
[[on-window-detected]]
if.app-id = 'com.microsoft.teams2'
run = ['move-node-to-workspace 9']
[[on-window-detected]]
if.app-id = 'com.tinyspeck.slackmacgap'
run = ['move-node-to-workspace 9']
[[on-window-detected]]
if.app-id = 'org.mozilla.firefox'
run = ['move-node-to-workspace 10', 'layout h_accordion']
[[on-window-detected]]
if.app-id = 'com.apple.Safari'
run = ['move-node-to-workspace 10', 'layout h_accordion']
[[on-window-detected]]
if.app-id = 'org.zotero.zotero'
run = ['move-node-to-workspace 6']