Skip to content

Instantly share code, notes, and snippets.

@lvnilesh
Forked from carlosflorencio/.aerospace.toml
Created February 13, 2024 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lvnilesh/5ce32d781c0794a43fcfdec912ea263b to your computer and use it in GitHub Desktop.
Save lvnilesh/5ce32d781c0794a43fcfdec912ea263b to your computer and use it in GitHub Desktop.
.aerospace.toml
start-at-login = true
accordion-padding = 0
gaps.inner.horizontal = 10
gaps.inner.vertical = 10
after-startup-command = [
'workspace 1', 'layout h_accordion horizontal',
'workspace 2', 'layout h_accordion horizontal',
]
[mode.main.binding]
# focus windows
ctrl-alt-cmd-shift-h = 'focus left'
ctrl-alt-cmd-shift-l = 'focus right'
ctrl-alt-cmd-shift-j = 'focus down'
ctrl-alt-cmd-shift-k = 'focus up'
# move windows
alt-shift-h = 'move-through left'
alt-shift-j = 'move-through down'
alt-shift-k = 'move-through up'
alt-shift-l = 'move-through right'
# resize
ctrl-alt-cmd-shift-minus = 'resize smart -50'
ctrl-alt-cmd-shift-equal = 'resize smart +50'
# focus monitors
ctrl-alt-cmd-shift-u = 'exec-and-forget ~/scripts/aerospace-next-monitor prev'
ctrl-alt-cmd-shift-o = 'exec-and-forget ~/scripts/aerospace-next-monitor next'
# ctrl-alt-cmd-shift-u = 'focus --boundaries all-monitors-outer-frame --boundaries-action stop left'
# ctrl-alt-cmd-shift-o = 'focus --boundaries all-monitors-outer-frame --boundaries-action stop right'
# change layout
ctrl-alt-cmd-shift-n = 'layout h_accordion horizontal vertical'
ctrl-alt-cmd-shift-b = 'layout tiles horizontal vertical'
ctrl-alt-cmd-shift-y = 'layout floating tiling'
ctrl-alt-cmd-shift-e = 'fullscreen'
# worspaces
alt-1 = 'workspace 1' # main monitor
alt-2 = 'workspace 2'
alt-3 = 'workspace 3'
alt-4 = 'workspace 4'
alt-5 = 'workspace 5' # left monitor
alt-6 = 'workspace 6'
alt-7 = 'workspace 7' # macbook
alt-8 = 'workspace 8'
# move windows to worspaces
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'
# switch workspaces
ctrl-left = 'workspace prev'
ctrl-right = 'workspace next'
# modes
ctrl-alt-cmd-shift-m = 'mode move'
ctrl-alt-cmd-shift-semicolon = 'mode service'
[workspace-to-monitor-force-assignment]
1 = 'main'
2 = 'main'
3 = 'main'
4 = 'main'
5 = ['lg ultra hd', 'secondary']
6 = ['lg ultra hd', 'secondary']
7 = ['built-in', 'secondary']
8 = ['built-in', 'secondary']
# modes
[mode.move.binding]
h = ['move-through left']
l = ['move-through right']
k = ['move-through up']
j = ['move-through down']
esc = 'mode main'
[mode.service.binding]
r = ['flatten-workspace-tree', 'mode main'] # reset layout
backspace = ['close-all-windows-but-current', 'mode main']
esc = ['reload-config', 'mode main']
# apps to workspaces
# left monitor - order matters
[[on-window-detected]]
if.app-id = 'com.google.Chrome'
if.window-title-regex-substring = '.+(twitch|youtube).+'
run = ['move-node-to-workspace 5']
[[on-window-detected]]
if.app-id = 'com.microsoft.VSCode'
run = ['move-node-to-workspace 1']
[[on-window-detected]]
if.app-id = 'com.vivaldi.Vivaldi'
run = ['move-node-to-workspace 2']
[[on-window-detected]]
if.app-id = 'com.google.Chrome'
run = ['move-node-to-workspace 2']
[[on-window-detected]]
if.app-id = 'com.apple.finder'
run = ['move-node-to-workspace 3']
[[on-window-detected]]
if.app-id = 'com.microsoft.teams2'
run = ['move-node-to-workspace 3']
[[on-window-detected]]
if.app-id = 'com.postmanlabs.mac'
run = ['move-node-to-workspace 4']
[[on-window-detected]]
if.app-id = 'com.TickTick.task.mac'
run = ['move-node-to-workspace 6']
[[on-window-detected]]
if.app-id = 'com.tinyspeck.slackmacgap'
run = ['move-node-to-workspace 7']
[[on-window-detected]]
if.app-id = 'com.microsoft.Outlook'
run = ['move-node-to-workspace 8']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment