Repository navigation
Expand file tree
/
Copy pathdot_aerospace.toml
More file actions
90 lines (78 loc) · 5.57 KB
/
Copy pathdot_aerospace.toml
File metadata and controls
90 lines (78 loc) · 5.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
config-version = 2
# JankyBorders runs as a launchd service (`brew services start borders`), config
# in ~/.config/borders/bordersrc. Not launched here so there's a single source of
# truth and the border survives AeroSpace reloads/restarts.
start-at-login = true
enable-normalization-flatten-containers = true
default-root-container-layout = 'tiles'
default-root-container-orientation = 'auto'
# One app per workspace: Ghostty=1, Slack=2, DBeaver=3, Zen=4, WS5=junk drawer.
# All five persist so switch/banish/summon targets always exist.
persistent-workspaces = ["1", "2", "3", "4", "5"]
[gaps]
inner.horizontal = 8
inner.vertical = 8
outer.left = 8
outer.right = 8
outer.top = 8
outer.bottom = 8
[mode.main.binding]
# Match Arch's Super shortcuts with Command in the same physical position.
cmd-left = 'focus left'
cmd-down = 'focus down'
cmd-up = 'focus up'
cmd-right = 'focus right'
cmd-shift-left = 'move left'
cmd-shift-down = 'move down'
cmd-shift-up = 'move up'
cmd-shift-right = 'move right'
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-slash = 'layout tiles horizontal'
alt-comma = 'layout accordion horizontal'
cmd-ctrl-f = 'fullscreen'
alt-shift-space = 'layout floating tiling'
alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
# Summon TOGGLE: if the app is NOT on the current workspace, pull it here + focus it.
# If it IS already here, banish it back to its home workspace. Same key both ways.
# Homes: Ghostty=1, Zen=4, Slack=2, DBeaver=3. No-op if the app has no window.
cmd-ctrl-g = 'exec-and-forget wl=$(aerospace list-windows --monitor all --app-bundle-id com.mitchellh.ghostty --format "%{window-id} %{workspace}" | head -n1); wid=${wl%% *}; ws=${wl##* }; cur=$(aerospace list-workspaces --focused); [ -z "$wid" ] || { if [ "$ws" = "$cur" ]; then aerospace move-node-to-workspace --window-id "$wid" 1; else aerospace move-node-to-workspace --window-id "$wid" --focus-follows-window "$cur"; fi; }'
cmd-ctrl-z = 'exec-and-forget wl=$(aerospace list-windows --monitor all --app-bundle-id app.zen-browser.zen --format "%{window-id} %{workspace}" | head -n1); wid=${wl%% *}; ws=${wl##* }; cur=$(aerospace list-workspaces --focused); [ -z "$wid" ] || { if [ "$ws" = "$cur" ]; then aerospace move-node-to-workspace --window-id "$wid" 4; else aerospace move-node-to-workspace --window-id "$wid" --focus-follows-window "$cur"; fi; }'
cmd-ctrl-s = 'exec-and-forget wl=$(aerospace list-windows --monitor all --app-bundle-id com.tinyspeck.slackmacgap --format "%{window-id} %{workspace}" | head -n1); wid=${wl%% *}; ws=${wl##* }; cur=$(aerospace list-workspaces --focused); [ -z "$wid" ] || { if [ "$ws" = "$cur" ]; then aerospace move-node-to-workspace --window-id "$wid" 2; else aerospace move-node-to-workspace --window-id "$wid" --focus-follows-window "$cur"; fi; }'
cmd-ctrl-d = 'exec-and-forget wl=$(aerospace list-windows --monitor all --app-bundle-id org.jkiss.dbeaver.core.product --format "%{window-id} %{workspace}" | head -n1); wid=${wl%% *}; ws=${wl##* }; cur=$(aerospace list-workspaces --focused); [ -z "$wid" ] || { if [ "$ws" = "$cur" ]; then aerospace move-node-to-workspace --window-id "$wid" 3; else aerospace move-node-to-workspace --window-id "$wid" --focus-follows-window "$cur"; fi; }'
# Whole-desktop float / re-tile (temporary free-drag mode for the current workspace)
cmd-ctrl-shift-f = 'exec-and-forget for wid in $(aerospace list-windows --workspace $(aerospace list-workspaces --focused) --format "%{window-id}"); do aerospace layout floating --window-id "$wid"; done'
cmd-ctrl-shift-t = 'exec-and-forget for wid in $(aerospace list-windows --workspace $(aerospace list-workspaces --focused) --format "%{window-id}"); do aerospace layout tiling --window-id "$wid"; done'
# Hard reset: send every window of each app to its home workspace (Ghostty=1, Slack=2,
# DBeaver=3, Zen=4), then sweep any stray/unknown window off WS1-4 into WS5 (junk).
cmd-ctrl-r = 'exec-and-forget for pair in "com.mitchellh.ghostty 1" "com.tinyspeck.slackmacgap 2" "org.jkiss.dbeaver.core.product 3" "app.zen-browser.zen 4"; do bid=${pair%% *}; home=${pair##* }; for w in $(aerospace list-windows --monitor all --app-bundle-id "$bid" --format "%{window-id}"); do aerospace move-node-to-workspace --window-id "$w" "$home"; done; done; for ws in 1 2 3 4; do case "$ws" in 1) owner=com.mitchellh.ghostty ;; 2) owner=com.tinyspeck.slackmacgap ;; 3) owner=org.jkiss.dbeaver.core.product ;; 4) owner=app.zen-browser.zen ;; esac; aerospace list-windows --workspace "$ws" --format "%{window-id}|%{app-bundle-id}" | while IFS="|" read -r w bid; do [ "$bid" = "$owner" ] || aerospace move-node-to-workspace --window-id "$w" 5; done; done'
[[on-window-detected]]
if = 'test %{app-bundle-id} = com.mitchellh.ghostty'
run = 'move-node-to-workspace 1'
[[on-window-detected]]
if = 'test %{app-bundle-id} = com.tinyspeck.slackmacgap'
run = 'move-node-to-workspace 2'
[[on-window-detected]]
if = 'test %{app-bundle-id} = org.jkiss.dbeaver.core.product'
run = 'move-node-to-workspace 3'
[[on-window-detected]]
if = 'test %{app-bundle-id} = app.zen-browser.zen'
run = 'move-node-to-workspace 4'