| 1 | # ::: |
| 2 | # :::: espadonne (mfw) aerospace config :::: |
| 3 | # ::::::::::::::::::::::::::::::::::::::::::::::: |
| 4 | # |
| 5 | # TODO: @espadonne (mfw) look into mouse move options |
| 6 | # TODO: @espadonne (mfw) consider dynamic padding if possible? |
| 7 | # TODO: @espadonne (mfw) padding? no, what was it, monitors? idk dude. cmd+up |
| 8 | # isn't fast enough sometimes |
| 9 | # TODO: @espadonne (mfw) toolbox/setting apps float away from taskbar? |
| 10 | # TODO: @espadonne (mfw) utility mode to launch apple default apps |
| 11 | # TODO: @espadonne (mfw) don't shadow unix keybinds you use |
| 12 | # TODO: matt. |
| 13 | # matt. |
| 14 | # matt. |
| 15 | # you 'fixed' that unix kb shadow with another unix kb. fix that. |
| 16 | # |
| 17 | # |
| 18 | # ::: SEE: |
| 19 | # :::: COMMANDS : https://nikitabobko.github.io/AeroSpace/commands |
| 20 | # :::: MONITORS?: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors |
| 21 | # |
| 22 | |
| 23 | # ::: |
| 24 | # :::: DEFAULTS & GLOBALS :::: |
| 25 | # ::::::::::::::::::::::::::::::::: |
| 26 | # |
| 27 | |
| 28 | # ::: |
| 29 | # Start AeroSpace at login |
| 30 | start-at-login = true |
| 31 | |
| 32 | # ::: |
| 33 | # This is for after a |
| 34 | # macOS user session login, and not |
| 35 | # the machine startup, and not aerospace startup |
| 36 | # |
| 37 | # :::: NOTE: @espadonne requirement: |
| 38 | # ::::: `start-at-login` must be set to `true` in |
| 39 | # ::::: for this to work. |
| 40 | # ::::: |
| 41 | # after-login-command = [] |
| 42 | |
| 43 | # ::: |
| 44 | # This is for aerospace |
| 45 | # post-startup, not the machine |
| 46 | # For commands, see: https://nikitabobko.github.io/AeroSpace/commands |
| 47 | after-startup-command = ['exec-and-forget wezterm'] |
| 48 | |
| 49 | # ::: |
| 50 | # Normalizations, nothing |
| 51 | # to here-see, notta-thing outtan-ordinary |
| 52 | # See: https://nikitabobko.github.io/AeroSpace/guide#normalization |
| 53 | enable-normalization-flatten-containers = true |
| 54 | enable-normalization-opposite-orientation-for-nested-containers = true |
| 55 | |
| 56 | # ::: |
| 57 | # To disable accordion |
| 58 | # padding altogether, set to zed |
| 59 | accordion-padding = 18 |
| 60 | |
| 61 | # ::: |
| 62 | # Set to 'tiles' or 'accordion' |
| 63 | # See: https://nikitabobko.github.io/AeroSpace/guide#layouts |
| 64 | default-root-container-layout = 'tiles' |
| 65 | |
| 66 | # |
| 67 | # ::: |
| 68 | # Possible values: |
| 69 | # Set to 'horizontal', 'vertical', or 'auto' |
| 70 | # |
| 71 | # :::: NOTE: on auto: |
| 72 | # ::::: portrait viewport :: vertical |
| 73 | # ::::: landscape viewport :: horizontal |
| 74 | # ::::: anything else should follow this gist |
| 75 | default-root-container-orientation = 'auto' |
| 76 | |
| 77 | |
| 78 | # ::: |
| 79 | # Commentout to disable behavior, |
| 80 | # and falls back to empty list, `[]`, See my todo #1 |
| 81 | # See: https://nikitabobko.github.io/AeroSpace/commands#move-mouse |
| 82 | # See: https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks |
| 83 | on-focus-changed = ['move-mouse window-lazy-center'] |
| 84 | on-focused-monitor-changed = ['move-mouse monitor-lazy-center'] |
| 85 | |
| 86 | |
| 87 | |
| 88 | # ::: |
| 89 | # Map it to qwerked |
| 90 | # up quirty, or everyone's |
| 91 | # favorite New World Symphonist |
| 92 | # ie, |
| 93 | # Possible values: 'qwerty', 'dvorak' |
| 94 | # |
| 95 | # :::: NOTE: @espadonne on keymappings: |
| 96 | # ::::: you can do some kind |
| 97 | # ::::: of cool things like alias keys! |
| 98 | # |
| 99 | # See: https://nikitabobko.github.io/AeroSpace/guide#key-mapping |
| 100 | [key-mapping] |
| 101 | preset = 'qwerty' |
| 102 | |
| 103 | # ::: |
| 104 | # According to the |
| 105 | # CSS folks th- well hey what |
| 106 | # exactly would the container be here? |
| 107 | # |
| 108 | # :::: NOTE: @espadonne params(?) |
| 109 | # ::::: constants: |
| 110 | # ::::: inner.{horizontal,vertical} = n |
| 111 | # ::::: outer.{top,left,right,bottom} = n |
| 112 | # ::::: |
| 113 | # ::::: multimonitor: |
| 114 | # ::::: I don't really follow it yet; |
| 115 | # ::::: DIRECT from the docs: |
| 116 | # ::::: |
| 117 | # Per monitor: |
| 118 | # gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24] |
| 119 | # In this example, 24 is a default value when there is no match. |
| 120 | # Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'. |
| 121 | # See: |
| 122 | # https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors |
| 123 | [gaps] |
| 124 | outer.top = [{ monitor.main = 6 }, |
| 125 | { monitor."LU28R55" = 48 }, |
| 126 | { monitor."Odyssey*" = 48 }, |
| 127 | { monitor."HP*" = 48 }, |
| 128 | 12] |
| 129 | outer.left = [{ monitor.main = 12 }, |
| 130 | { monitor."LU28R55" = 12 }, |
| 131 | { monitor."Odyssey*" = 12 }, |
| 132 | { monitor."HP*" = 12 }, |
| 133 | 12] |
| 134 | outer.bottom = [{ monitor.main = 12 }, |
| 135 | { monitor."LU28R55" = 12 }, |
| 136 | { monitor."Odyssey*" = 12 }, |
| 137 | { monitor."HP*" = 12 }, |
| 138 | 12] |
| 139 | outer.right = [{ monitor.main = 12 }, |
| 140 | { monitor."LU28R55" = 12 }, |
| 141 | { monitor."Odyssey*" = 12 }, |
| 142 | { monitor."HP*" = 12 }, |
| 143 | 12] |
| 144 | |
| 145 | inner.horizontal = 6 |
| 146 | inner.vertical = 6 |
| 147 | |
| 148 | # Ensure Homebrew’s bins are in the PATH for all `exec-*` calls |
| 149 | [exec.env-vars] |
| 150 | PATH = "/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:${PATH}" |
| 151 | |
| 152 | # ::: |
| 153 | # :::: MODES & MODE BINDINGS :::: |
| 154 | # ::::: ::::::::::::::::::::: ::::: |
| 155 | # |
| 156 | # NOTE: you can create multiple |
| 157 | # sets of bindings by making |
| 158 | # different modes |
| 159 | # |
| 160 | # |
| 161 | # VALID KEYS: |
| 162 | # - Digits: 0-9 |
| 163 | # - Letters: a-z |
| 164 | # - F-Key digits: `f{1,2,...,?}` |
| 165 | # - Numpad digits: `keypad{0,1,...,9}` |
| 166 | # - Specially Named: minus, equal, period, comma, |
| 167 | # slash, backslash, quote, semicolon, |
| 168 | # backtick, leftSquareBracket, rightSquareBracket, |
| 169 | # space, enter, esc, backspace, tab |
| 170 | # - Keypad specials: keypad{Clear,DecimalMark,Divide,Enter,Equal,Minus,Multiply,Plus} |
| 171 | # |
| 172 | # - Arrows: up, down, left, right |
| 173 | # |
| 174 | # VALID MODIFIERS: |
| 175 | # - cmd |
| 176 | # - alt |
| 177 | # - ctrl |
| 178 | # - shift |
| 179 | |
| 180 | |
| 181 | # ::: |
| 182 | # psvm or is it |
| 183 | # pvsm o- hang on is it |
| 184 | # not like int main(something.. |
| 185 | # |
| 186 | # necessary main mode keybinds |
| 187 | # |
| 188 | # :::: NOTE: @ on missing key |
| 189 | # ::::: fallback value is `{}`, so |
| 190 | # ::::: don't come cryna me when you |
| 191 | # ::::: are waxing pythonic, matthias |
| 192 | # |
| 193 | # See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes |
| 194 | [mode.main.binding] |
| 195 | |
| 196 | # ::: |
| 197 | # :::: MODE DEFINITIONS :::: |
| 198 | # ::::: :::::::::::::::: ::::: |
| 199 | # |
| 200 | alt-a = 'mode apps' |
| 201 | alt-u = 'mode utility' |
| 202 | alt-p = 'mode monitor' |
| 203 | |
| 204 | |
| 205 | cmd-enter = 'exec-and-forget wezterm start' |
| 206 | cmd-shift-enter = 'exec-and-forget open -na Ghostty' |
| 207 | |
| 208 | |
| 209 | ctrl-alt-tab = 'workspace-back-and-forth' |
| 210 | |
| 211 | # == Node focus (pane navigation) |
| 212 | ctrl-shift-left = 'focus left' |
| 213 | ctrl-shift-down = 'focus down' |
| 214 | ctrl-shift-up = 'focus up' |
| 215 | ctrl-shift-right = 'focus right' |
| 216 | |
| 217 | # == Move node (pane reposition) |
| 218 | ctrl-alt-shift-left = 'move left' |
| 219 | ctrl-alt-shift-down = 'move down' |
| 220 | ctrl-alt-shift-up = 'move up' |
| 221 | ctrl-alt-shift-right = 'move right' |
| 222 | |
| 223 | # == Workspace select |
| 224 | ctrl-0 = 'workspace 0' |
| 225 | ctrl-1 = 'workspace 1' |
| 226 | ctrl-2 = 'workspace 2' |
| 227 | ctrl-3 = 'workspace 3' |
| 228 | ctrl-4 = 'workspace 4' |
| 229 | ctrl-5 = 'workspace 5' |
| 230 | ctrl-6 = 'workspace 6' |
| 231 | ctrl-7 = 'workspace 7' |
| 232 | ctrl-8 = 'workspace 8' |
| 233 | ctrl-9 = 'workspace 9' |
| 234 | |
| 235 | ctrl-i = 'workspace I' |
| 236 | ctrl-m = 'workspace M' |
| 237 | ctrl-z = 'workspace Z' |
| 238 | |
| 239 | # == Move node to workspace |
| 240 | ctrl-shift-0 = 'move-node-to-workspace 0 --focus-follows-window' |
| 241 | ctrl-shift-1 = 'move-node-to-workspace 1 --focus-follows-window' |
| 242 | ctrl-shift-2 = 'move-node-to-workspace 2 --focus-follows-window' |
| 243 | ctrl-shift-3 = 'move-node-to-workspace 3 --focus-follows-window' |
| 244 | ctrl-shift-4 = 'move-node-to-workspace 4 --focus-follows-window' |
| 245 | ctrl-shift-5 = 'move-node-to-workspace 5 --focus-follows-window' |
| 246 | ctrl-shift-6 = 'move-node-to-workspace 6 --focus-follows-window' |
| 247 | ctrl-shift-7 = 'move-node-to-workspace 7 --focus-follows-window' |
| 248 | ctrl-shift-8 = 'move-node-to-workspace 8 --focus-follows-window' |
| 249 | ctrl-shift-9 = 'move-node-to-workspace 9 --focus-follows-window' |
| 250 | |
| 251 | ctrl-shift-i = 'move-node-to-workspace I --focus-follows-window' |
| 252 | # ctrl-shift-g = 'move-node-to-workspace G --focus-follows-window' |
| 253 | ctrl-shift-m = 'move-node-to-workspace M --focus-follows-window' |
| 254 | ctrl-shift-s = 'move-node-to-workspace S --focus-follows-window' |
| 255 | # ctrl-shift-f = 'move-node-to-workspace F --focus-follows-window' |
| 256 | ctrl-shift-w = 'move-node-to-workspace W --focus-follows-window' |
| 257 | ctrl-shift-z = 'move-node-to-workspace Z --focus-follows-window' |
| 258 | |
| 259 | # == Monitor focus |
| 260 | ctrl-alt-left = 'focus-monitor prev --wrap-around' |
| 261 | ctrl-alt-right = 'focus-monitor next --wrap-around' |
| 262 | |
| 263 | # == Move node to monitor |
| 264 | cmd-ctrl-shift-left = 'move-node-to-monitor prev --wrap-around --focus-follows-window' |
| 265 | cmd-ctrl-shift-right = 'move-node-to-monitor next --wrap-around --focus-follows-window' |
| 266 | |
| 267 | # == Move workspace to monitor |
| 268 | cmd-alt-shift-left = 'move-workspace-to-monitor prev' |
| 269 | cmd-alt-shift-right = 'move-workspace-to-monitor next' |
| 270 | |
| 271 | # ::: |
| 272 | # Eh, pretty self-expl |
| 273 | # if you ask me? But maybe not accordion, idk |
| 274 | # |
| 275 | # See: https://nikitabobko.github.io/AeroSpace/commands#layout |
| 276 | alt-slash = 'layout horizontal vertical' |
| 277 | ctrl-alt-slash = 'layout floating tiling' |
| 278 | alt-shift-slash = 'layout tiles accordion' |
| 279 | |
| 280 | # ::: |
| 281 | # See: https://nikitabobko.github.io/AeroSpace/commands#resize |
| 282 | alt-minus = 'resize smart -50' |
| 283 | alt-equal = 'resize smart +50' |
| 284 | ctrl-alt-minus = 'resize smart -75' |
| 285 | ctrl-alt-equal = 'resize smart +75' |
| 286 | alt-shift-minus = 'resize smart -100' |
| 287 | alt-shift-equal = 'resize smart +100' |
| 288 | ctrl-alt-shift-minus = 'resize smart -150' |
| 289 | ctrl-alt-shift-equal = 'resize smart +150' |
| 290 | |
| 291 | |
| 292 | # Launch morkgui via macOS Terminal for dynamic workspace moving, then bring Terminal to front |
| 293 | ctrl-alt-shift-m = [ |
| 294 | "exec-and-forget osascript -e 'tell application \"Terminal\" to do script \"/usr/local/bin/morkgui; exit\"' -e 'tell application \"Terminal\" to activate'", |
| 295 | "mode main" |
| 296 | ] |
| 297 | |
| 298 | # :::: NOTE: @espadonne broken |
| 299 | # ::::: don't feel like searching |
| 300 | # ::::: through binaries atm |
| 301 | # :::: |
| 302 | # :::: NOTE: @ espadonne some just go by name |
| 303 | # :::: |
| 304 | # ctrl-alt-i = 'exec-and-forget open -a /System/Applications/Utilities/Activity Monitor.app' |
| 305 | # ctrl-alt-j = 'exec-and-forget open -a /System/Volumes/Data/Applications/DaVinci Resolve/DaVinci Resolve.app' |
| 306 | |
| 307 | |
| 308 | # ::: |
| 309 | # :::: FLOATING WINDOWS :::: |
| 310 | # ::::: :::::::::::::::: ::::: |
| 311 | # |
| 312 | # NOTE: you'll float too ;) |
| 313 | # - Coppersage the C(L)ow(N) |
| 314 | # - @espadonne |
| 315 | # - mfw (just a bittabanta) |
| 316 | # |
| 317 | # TODO: @espadonne there's a better way |
| 318 | # |
| 319 | [[on-window-detected]] |
| 320 | if.app-name-regex-substring = '(?i)^(finder|zotero|skim)' |
| 321 | run = 'layout floating' |
| 322 | |
| 323 | [[on-window-detected]] |
| 324 | if.app-name-regex-substring = '(?i)^(camera|quicktime|synergy)' |
| 325 | run = 'layout floating' |
| 326 | |
| 327 | [[on-window-detected]] |
| 328 | if.app-name-regex-substring = '(?i)^(safari|app store|contacts)' |
| 329 | run = 'layout floating' |
| 330 | |
| 331 | [[on-window-detected]] |
| 332 | if.app-name-regex-substring = '(?i)^(chatgpt|bitwarden|calculator)' |
| 333 | run = 'layout floating' |
| 334 | |
| 335 | [[on-window-detected]] |
| 336 | if.app-name-regex-substring = '(?i)^(zoom|balena|activity monitor)' |
| 337 | run = 'layout floating' |
| 338 | |
| 339 | [[on-window-detected]] |
| 340 | if.app-name-regex-substring = '(?i)^(passwords|preview|facetime|music|ticktick)' |
| 341 | run = 'layout floating' |
| 342 | |
| 343 | [[on-window-detected]] |
| 344 | if.app-name-regex-substring = '(?i)^(reminders|siri|weather|books|clock|notes|ghostty|terminal|alacritty)' |
| 345 | run = 'layout floating' |
| 346 | |
| 347 | [[on-window-detected]] |
| 348 | if.window-title-regex-substring = '(?i)wulftp' |
| 349 | run = 'layout floating' |
| 350 | |
| 351 | # ::: |
| 352 | # :::: DEDICATED WORKSPINDOWS :::: |
| 353 | # ::::: :::::::::::::::::::::: ::::: |
| 354 | # |
| 355 | |
| 356 | # [[on-window-detected]] |
| 357 | # if.app-name-regex-substring = '(?i)ghostty' |
| 358 | # run = [ |
| 359 | # 'layout tiling', |
| 360 | # 'move-node-to-workspace G', |
| 361 | # ] |
| 362 | |
| 363 | # [[on-window-detected]] |
| 364 | # if.app-name-regex-substring = '(?i)wezterm' |
| 365 | # run = [ |
| 366 | # 'layout tiling', |
| 367 | # 'move-node-to-workspace W', |
| 368 | # ] |
| 369 | |
| 370 | # [[on-window-detected]] |
| 371 | # if.app-name-regex-substring = '(?i)terminal' |
| 372 | # run = [ |
| 373 | # 'layout tiling', |
| 374 | # 'move-node-to-workspace T' |
| 375 | # ] |
| 376 | |
| 377 | # [[on-window-detected]] |
| 378 | # if.app-name-regex-substring = '(?i)discord' |
| 379 | # run = [ |
| 380 | # 'layout tiling', |
| 381 | # 'move-node-to-workspace I', |
| 382 | # ] |
| 383 | |
| 384 | |
| 385 | [[on-window-detected]] |
| 386 | if.app-name-regex-substring = '(?i)messages' |
| 387 | run = [ |
| 388 | 'layout tiling', |
| 389 | 'move-node-to-workspace M', |
| 390 | ] |
| 391 | |
| 392 | [[on-window-detected]] |
| 393 | if.app-name-regex-substring = '(?i)firefox' |
| 394 | run = [ |
| 395 | 'layout tiling', |
| 396 | 'move-node-to-workspace 1', |
| 397 | ] |
| 398 | |
| 399 | # [[on-window-detected]] |
| 400 | # if.app-name-regex-substring = '(?i)zen' |
| 401 | # run = [ |
| 402 | # 'layout tiling', |
| 403 | # 'move-node-to-workspace Z', |
| 404 | # ] |
| 405 | |
| 406 | # [[on-window-detected]] |
| 407 | # if.app-name-regex-substring = '(?i)davinci' |
| 408 | # run = [ |
| 409 | # 'layout tiling', |
| 410 | # 'move-node-to-workspace V', |
| 411 | # ] |
| 412 | |
| 413 | # Float only if launched with title "WezFloat" (broken) |
| 414 | [[on-window-detected]] |
| 415 | if.window-title-regex-substring = 'WezFloat' |
| 416 | run = 'layout floating' |
| 417 | |
| 418 | # Default tiling for other WezTerm windows (but the other thing is broken anyway) |
| 419 | [[on-window-detected]] |
| 420 | if.app-name-regex-substring = '(?i)wezterm' |
| 421 | run = 'layout tiling' |
| 422 | |
| 423 | |
| 424 | # ::: |
| 425 | # :::: APPLE APPS // UTILITY MODE :::: |
| 426 | # ::::: :::::::::::::::::::::::::: ::::: |
| 427 | # |
| 428 | [mode.utility.binding] |
| 429 | u = ['exec-and-forget open -a Preview', 'mode main'] |
| 430 | i = ['exec-and-forget open -a Siri', 'mode main'] |
| 431 | b = ['exec-and-forget open -a Books', 'mode main'] |
| 432 | m = ['exec-and-forget open -a Music', 'mode main'] |
| 433 | n = ['exec-and-forget open -a Notes', 'mode main'] |
| 434 | e = ['exec-and-forget open -a Finder', 'mode main'] |
| 435 | w = ['exec-and-forget open -a Weather', 'mode main'] |
| 436 | t = ['exec-and-forget open -a Terminal', 'mode main'] |
| 437 | f = ['exec-and-forget open -a FaceTime', 'mode main'] |
| 438 | d = ['exec-and-forget open -a Freeform', 'mode main'] |
| 439 | l = ['exec-and-forget open -a Launchpad', 'mode main'] |
| 440 | r = ['exec-and-forget open -a Reminders', 'mode main'] |
| 441 | c = ['exec-and-forget open -a Calculator', 'mode main'] |
| 442 | v = ['exec-and-forget open -a Voice Memos', 'mode main'] |
| 443 | s = ['exec-and-forget open -a /Applications/Safari.app', 'mode main'] |
| 444 | h = ['exec-and-forget open -a /Applications/ChatGPT.app', 'mode main'] |
| 445 | # ::: |
| 446 | # yeah, y'all he bit the bullet, |
| 447 | # but it kinda gets in the way from my |
| 448 | # brief tinkering thus far. Like it'll propose |
| 449 | # decisions that are really just clear downstream problems and u- |
| 450 | # nless you read along with some care it's easy to miss the trenchfootgu |
| 451 | # -n. |
| 452 | p = ['exec-and-forget open -a /Applications/Bitwarden.app', 'mode main'] |
| 453 | |
| 454 | esc = 'mode main' |
| 455 | ctrl-esc = ['reload-config', 'mode main'] |
| 456 | |
| 457 | ctrl-r = ['flatten-workspace-tree', 'mode main'] |
| 458 | backspace = ['close-all-windows-but-current', 'mode main'] |
| 459 | |
| 460 | # TODO: mfw look into, pulled from dfault config |
| 461 | alt-shift-k = ['join-with up', 'mode main'] |
| 462 | alt-shift-j = ['join-with down', 'mode main'] |
| 463 | alt-shift-h = ['join-with left', 'mode main'] |
| 464 | alt-shift-l = ['join-with right', 'mode main'] |
| 465 | |
| 466 | |
| 467 | |
| 468 | [mode.apps.binding] |
| 469 | z = ['exec-and-forget open -a /Applications/Zen.app', 'mode main'] |
| 470 | s = ['exec-and-forget open -a /Applications/Slack.app', 'mode main'] |
| 471 | w = ['exec-and-forget open -a WezTerm', 'mode main'] |
| 472 | f = ['exec-and-forget open -a /Applications/Firefox.app', 'mode main'] |
| 473 | g = ['exec-and-forget open -a /Applications/Ghostty.app', 'mode main'] |
| 474 | i = ['exec-and-forget open -a /Applications/Discord.app', 'mode main'] |
| 475 | a = ['exec-and-forget open -a /Applications/Audacity.app', 'mode main'] |
| 476 | m = ['exec-and-forget open -a /System/Applications/Messages.app', 'mode main'] |
| 477 | o = ['exec-and-forget open -a ticktick', 'mode main'] |
| 478 | esc = 'mode main' |