Last active
September 19, 2024 07:49
-
-
Save vianneychin/a4b61eba3d2745a3468bdbe93889c804 to your computer and use it in GitHub Desktop.
Aerospace config for MacOS window manager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reference: https://github.com/i3/i3/blob/next/etc/config | |
# i3 doesn't have "normalizations" feature that why we disable them here. | |
# But the feature is very helpful. | |
# Normalizations eliminate all sorts of weird tree configurations that don't make sense. | |
# Give normalizations a chance and enable them back. | |
enable-normalization-flatten-containers = false | |
enable-normalization-opposite-orientation-for-nested-containers = false | |
# Mouse follows focus when focused monitor changes | |
on-focused-monitor-changed = ['move-mouse monitor-lazy-center'] | |
on-focus-changed = "move-mouse window-lazy-center" | |
[gaps] | |
inner.vertical = 0 | |
inner.horizontal = 0 | |
outer.top = 0 | |
outer.bottom = 0 | |
outer.left = 0 | |
outer.right = 0 | |
[mode.main.binding] | |
alt-enter = 'exec-and-forget open -n /System/Applications/Utilities/Terminal.app' | |
alt-h = 'focus left' | |
alt-j = 'focus down' | |
alt-k = 'focus up' | |
alt-l = 'focus right' | |
alt-shift-h = 'move left' | |
alt-shift-j = 'move down' | |
alt-shift-k = 'move up' | |
alt-shift-l = 'move right' | |
alt-tab = 'workspace-back-and-forth' | |
# alt-shift-tab = 'move-workspace-to-monitor --wrap-around next' # Moves all items in current monitor to other monitor | |
# Consider using 'join-with' command as a 'split' replacement if you want to enable normalizations | |
# alt-h = 'split horizontal' | |
alt-v = 'split vertical' | |
alt-f = 'fullscreen' | |
alt-s = 'layout v_accordion' # 'layout stacking' in i3 | |
alt-w = 'layout h_accordion' # 'layout tabbed' in i3 | |
alt-e = 'layout tiles horizontal vertical' # 'layout toggle split' in i3 | |
alt-shift-space = 'layout floating tiling' # 'floating toggle' in i3 | |
# Not supported, because this command is redundant in AeroSpace mental model. | |
# See: https://nikitabobko.github.io/AeroSpace/guide#floating-windows | |
#alt-space = 'focus toggle_tiling_floating' | |
# `focus parent`/`focus child` are not yet supported, and it's not clear whether they | |
# should be supported at all https://github.com/nikitabobko/AeroSpace/issues/5 | |
# alt-a = 'focus parent' | |
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 0' | |
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 0' | |
alt-shift-c = 'reload-config' | |
alt-r = 'mode resize' | |
[[on-window-detected]] | |
if.app-id = 'com.googlecode.iterm2' | |
run = "move-node-to-workspace 0" | |
[[on-window-detected]] | |
if.app-id = 'de.beyondco.tinkerwell' | |
run = "move-node-to-workspace 0" | |
[[on-window-detected]] | |
if.app-id = 'com.microsoft.VSCode' | |
run = "move-node-to-workspace 1" | |
[[on-window-detected]] | |
if.app-id = 'org.mozilla.firefox' | |
run = "move-node-to-workspace 2" | |
[[on-window-detected]] | |
if.app-id = 'com.tinyapp.TablePlus' | |
run = "move-node-to-workspace 3" | |
[[on-window-detected]] | |
if.app-id = 'com.spotify.client' | |
run = "move-node-to-workspace 9" | |
[[on-window-detected]] | |
if.app-id = 'com.hnc.Discord' | |
run = "move-node-to-workspace 9" | |
[[on-window-detected]] | |
if.app-id = 'com.tinyspeck.slackmacgap' | |
run = "move-node-to-workspace 9" | |
[mode.resize.binding] | |
h = 'resize width -50' | |
j = 'resize height +50' | |
k = 'resize height -50' | |
l = 'resize width +50' | |
enter = 'mode main' | |
esc = 'mode main' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment