Skip to content

Commit

Permalink
feat(aerospace): remap alt to cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
Johnson Hu committed Jan 12, 2025
1 parent 1905648 commit 4bd6067
Showing 1 changed file with 55 additions and 57 deletions.
112 changes: 55 additions & 57 deletions config/aerospace.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,80 +94,80 @@ PATH = '/opt/homebrew/bin:/opt/homebrew/sbin:${PATH}'
# '''

# See: https://nikitabobko.github.io/AeroSpace/commands#layout
alt-slash = 'layout tiles horizontal vertical'
alt-backslash = 'layout accordion horizontal vertical'
cmd-slash = 'layout tiles horizontal vertical'
cmd-backslash = 'layout accordion horizontal vertical'

# See: https://nikitabobko.github.io/AeroSpace/commands#focus
alt-n = 'focus left'
alt-e = 'focus down'
alt-i = 'focus up'
alt-o = 'focus right'
cmd-n = 'focus left'
cmd-e = 'focus down'
cmd-i = 'focus up'
cmd-o = 'focus right'

# See: https://nikitabobko.github.io/AeroSpace/commands#move
alt-shift-n = 'move left'
alt-shift-e = 'move down'
alt-shift-i = 'move up'
alt-shift-o = 'move right'
cmd-shift-n = 'move left'
cmd-shift-e = 'move down'
cmd-shift-i = 'move up'
cmd-shift-o = 'move right'

# See: https://nikitabobko.github.io/AeroSpace/commands#resize
alt-shift-minus = 'resize smart -50'
alt-shift-equal = 'resize smart +50'
cmd-shift-minus = 'resize smart -50'
cmd-shift-equal = 'resize smart +50'


# fullscreen
alt-f = 'fullscreen'
cmd-f = 'fullscreen'

# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
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'
cmd-1 = 'workspace 1'
cmd-2 = 'workspace 2'
cmd-3 = 'workspace 3'
cmd-4 = 'workspace 4'
cmd-5 = 'workspace 5'
cmd-6 = 'workspace 6'
cmd-7 = 'workspace 7'
cmd-8 = 'workspace 8'
cmd-9 = 'workspace 9'
cmd-0 = 'workspace 0'

# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
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'
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 0'

# Custom shortcuts
alt-enter = 'exec-and-forget open -n /Applications/Ghostty.app'
cmd-enter = 'exec-and-forget open -n /Applications/Ghostty.app'

# alt-b = 'exec-and-forget open -n /Applications/Arc.app'
alt-b = 'exec-and-forget open -a "Zen Browser"'
# cmd-b = 'exec-and-forget open -n /Applications/Arc.app'
cmd-b = 'exec-and-forget open -a "Zen Browser"'

# See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
alt-tab = 'workspace-back-and-forth'
cmd-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'
cmd-shift-tab = 'move-workspace-to-monitor --wrap-around next'

alt-leftSquareBracket = 'workspace prev'
alt-rightSquareBracket = 'workspace next'
alt-shift-leftSquareBracket = 'move-node-to-workspace prev'
alt-shift-rightSquareBracket = 'move-node-to-workspace next'
cmd-leftSquareBracket = 'workspace prev'
cmd-rightSquareBracket = 'workspace next'
cmd-shift-leftSquareBracket = 'move-node-to-workspace prev'
cmd-shift-rightSquareBracket = 'move-node-to-workspace next'

alt-comma = 'focus-monitor left'
alt-period = 'focus-monitor right'
cmd-comma = 'focus-monitor left'
cmd-period = 'focus-monitor right'

alt-shift-comma = 'move-node-to-monitor left'
alt-shift-period = 'move-node-to-monitor right'
cmd-shift-comma = 'move-node-to-monitor left'
cmd-shift-period = 'move-node-to-monitor right'
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
alt-shift-semicolon = 'mode service'
cmd-shift-semicolon = 'mode service'

alt-shift-r = 'reload-config'
cmd-shift-r = 'reload-config'

alt-r = 'mode resize'
cmd-r = 'mode resize'

# Declare 'resize' binding mode
[mode.resize.binding]
Expand All @@ -192,10 +192,10 @@ backspace = ['close-all-windows-but-current', 'mode main']
# sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2
#s = ['layout sticky tiling', 'mode main']

alt-shift-n = ['join-with left', 'mode main']
alt-shift-e = ['join-with down', 'mode main']
alt-shift-i = ['join-with up', 'mode main']
alt-shift-o = ['join-with right', 'mode main']
cmd-shift-n = ['join-with left', 'mode main']
cmd-shift-e = ['join-with down', 'mode main']
cmd-shift-i = ['join-with up', 'mode main']
cmd-shift-o = ['join-with right', 'mode main']

# =================================================================
#
Expand Down Expand Up @@ -268,10 +268,8 @@ check-further-callbacks = true
run = 'layout floating'

[[on-window-detected]]
if.app-id="com.mitchellh.ghostty"
run= [
"layout tiling",
]
if.app-id = "com.mitchellh.ghostty"
run = ["layout tiling"]


# =================================================================
Expand Down

0 comments on commit 4bd6067

Please sign in to comment.