-
Notifications
You must be signed in to change notification settings - Fork 9
/
.skhdrc
301 lines (216 loc) · 17.2 KB
/
.skhdrc
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# HJKL
# focus window
ctrl + alt - h : yabai -m window --focus west || yabai -m window --focus east
ctrl + alt - j : yabai -m window --focus south || yabai -m window --focus north
ctrl + alt - k : yabai -m window --focus north || yabai -m window --focus south
ctrl + alt - l : yabai -m window --focus east || yabai -m window --focus west
# move window
ctrl + shift - h : (yabai -m window --warp west || yabai -m window --warp east) || yabai -m window --move rel:-40:0
ctrl + shift - j : (yabai -m window --warp south || yabai -m window --warp north) || yabai -m window --move rel:0:40
ctrl + shift - k : (yabai -m window --warp north || yabai -m window --warp south) || yabai -m window --move rel:0:-40
ctrl + shift - l : (yabai -m window --warp east || yabai -m window --warp west) || yabai -m window --move rel:40:0
# swap window
ctrl + alt + shift - h : yabai -m window --swap west || yabai -m window --swap east
ctrl + alt + shift - j : yabai -m window --swap south || yabai -m window --swap north
ctrl + alt + shift - k : yabai -m window --swap north || yabai -m window --swap south
ctrl + alt + shift - l : yabai -m window --swap east || yabai -m window --swap west
# UIOP
# resize window
ctrl + alt - u : yabai -m window --resize right:40:0 & yabai -m window --resize left:-40:0
ctrl + alt - i : yabai -m window --resize bottom:0:-40 & yabai -m window --resize top:0:40
ctrl + alt - o : yabai -m window --resize bottom:0:40 & yabai -m window --resize top:0:-40
ctrl + alt - p : yabai -m window --resize right:-40:0 & yabai -m window --resize left:40:0
# set insertion point in focused container
ctrl + shift - u : yabai -m window --insert west
ctrl + shift - i : yabai -m window --insert south
ctrl + shift - o : yabai -m window --insert north
ctrl + shift - p : yabai -m window --insert east
# VBNM
# focus and swap windows in stack
ctrl + alt - v : yabai -m window --swap stack.prev || yabai -m window --swap stack.last
ctrl + alt - b : yabai -m window --focus stack.next || yabai -m window --focus stack.first
ctrl + alt - n : yabai -m window --focus stack.prev || yabai -m window --focus stack.last
ctrl + alt - m : yabai -m window --swap stack.next || yabai -m window --swap stack.first
# BACKSPACE
# float / unfloat window and center on screen
ctrl + alt - backspace : yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 4:4:1:1:2:2; hs -c "hs.alert.show('Toggled Float')"
# make floating window fill screen
ctrl + shift - backspace : yabai -m window --grid 1:1:0:0:1:1
# cycle space management type
ctrl + alt + shift - backspace : source ~/.scripts/.space_change && sketchybar -m --trigger mode_change
# RETURN
# rotate tree clockwise
ctrl + alt - return : yabai -m space --rotate 270
# rotate tree counter-clockwise
ctrl + shift - return : yabai -m space --rotate 90
# balance size of windows
ctrl + alt + shift - return : yabai -m space --balance
# C+A
# make floating window fill left-half of screen
ctrl + shift - v : yabai -m window --grid 1:2:0:0:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 1:2:0:0:1:1) && sketchybar -m --trigger float_change
# make floating window fill right-half of screen
ctrl + shift - b : yabai -m window --grid 1:2:1:1:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 1:2:1:1:1:1) && sketchybar -m --trigger float_change
# make floating window fill top-half of screen
ctrl + shift - n : yabai -m window --grid 2:1:0:0:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 1:2:1:1:1:1) && sketchybar -m --trigger float_change
# make floating window fill bottom-half of screen
ctrl + shift - m : yabai -m window --grid 2:1:0:1:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 1:2:1:1:1:1) && sketchybar -m --trigger float_change
# horizontal thirds shortcuts
# make floating window fill left-thirds of screen
ctrl + alt - a : yabai -m window --grid 1:3:0:0:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 1:3:0:0:1:1) && sketchybar -m --trigger float_change
# make floating window fill center-thirds of screen
ctrl + alt - s : yabai -m window --grid 1:3:1:0:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 1:3:1:0:1:1) && sketchybar -m --trigger float_change
# make floating window fill right-thirds of screen
ctrl + alt - d : yabai -m window --grid 1:3:2:0:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 1:3:2:0:1:1) && sketchybar -m --trigger float_change
# vertical thirds shortcuts
# make floating window fill left-thirds of screen
ctrl + shift - a : yabai -m window --grid 3:1:0:0:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 3:1:0:0:1:1) && sketchybar -m --trigger float_change
# make floating window fill center-thirds of screen
ctrl + shift - s : yabai -m window --grid 3:1:0:1:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 3:1:0:1:1:1) && sketchybar -m --trigger float_change
# make floating window fill right-thirds of screen
ctrl + shift - d : yabai -m window --grid 3:1:0:2:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 3:1:0:2:1:1) && sketchybar -m --trigger float_change
# horizontal quarters
# make floating window fill left-thirds of screen
ctrl + alt + shift - a : yabai -m window --grid 1:4:0:0:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 1:4:0:0:1:1) && sketchybar -m --trigger float_change
# make floating window fill center-thirds of screen
ctrl + alt + shift - s : yabai -m window --grid 1:4:1:0:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 1:4:1:0:1:1) && sketchybar -m --trigger float_change
# make floating window fill right-thirds of screen
ctrl + alt + shift - d : yabai -m window --grid 1:4:2:0:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 1:4:2:0:1:1) && sketchybar -m --trigger float_change
# make floating window fill right-thirds of screen
ctrl + alt + shift - f : yabai -m window --grid 1:4:3:0:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 1:4:3:0:1:1) && sketchybar -m --trigger float_change
# corner quarters shortcuts
# make floating window fill top-right quarter of screen
ctrl + alt + shift - v : yabai -m window --grid 2:2:1:0:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 1:2:1:1:1:1) && sketchybar -m --trigger float_change
# make floating window fill top-left quarter of screen
ctrl + alt + shift - b : yabai -m window --grid 2:2:0:0:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 1:2:1:1:1:1) && sketchybar -m --trigger float_change
# make floating window fill bottom-right quarter of screen
ctrl + alt + shift - n : yabai -m window --grid 2:2:1:1:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 1:2:1:1:1:1) && sketchybar -m --trigger float_change
# make floating window fill bottom-left quarter of screen
ctrl + alt + shift - m : yabai -m window --grid 2:2:0:1:1:1 || (yabai -m window --toggle float; yabai -m window --toggle border; yabai -m window --grid 1:2:1:1:1:1) && sketchybar -m --trigger float_change
# \
# toggle window split type '\'
ctrl + alt - 0x2A: yabai -m window --toggle split && sketchybar -m --trigger mode_change
# toggle window parent zoom '\'
ctrl + shift - 0x2A : yabai -m window --toggle zoom-parent
# toggle picture-in-picture '\'
ctrl + alt + shift - 0x2A : yabai -m window --toggle sticky && sketchybar -m --trigger mode_change; hs -c "hs.alert.show('Sticky Mode Toggled')"
# ;
# zoom window to or full screen ';' SKETCH
ctrl + alt - 0x29 : yabai -m window --toggle zoom-fullscreen && sketchybar -m --trigger float_change
# []
# mirror tree y-axis '['
ctrl + alt - 0x21 : yabai -m space --mirror y-axis
# mirror tree x-axis ']'
ctrl + alt - 0x1E : yabai -m space --mirror x-axis
# swap current window with largest window '['
ctrl + shift - 0x21 : yabai -m window --swap largest
# swap current window with largest window ']'
ctrl + shift - 0x1E : yabai -m window --swap smallest
# 0
# toggle desktop offset '0'
ctrl + alt - 0 : yabai -m space --padding abs:0:0:0:0
# toggle window offset '0'
ctrl + shift - 0 : yabai -m space --gap abs:0
# toggle window and desktop offset '0'
ctrl + alt + shift - 0 : yabai -m space --gap abs:0 && yabai -m space --padding abs:0:0:0:0
# -
# decrease padding between desktop '-'
ctrl + alt - 0x18 :yabai -m space --padding rel:5:5:5:5
# decrease padding between windows '-'
ctrl + alt - 0x18 : yabai -m space --gap rel:5
# decrease padding between windows and desktop '-'
ctrl + alt + shift - 0x18 : yabai -m space --gap rel:5 && yabai -m space --padding rel:5:5:5:5
# +
# increase padding between desktop '+'
ctrl + alt - 0x1B : yabai -m space --padding rel:-5:-5:-5:-5
# increase padding between windows '+'
ctrl + alt - 0x1B : yabai -m space --gap rel:-5
# increase padding between windows and desktop '+'
ctrl + alt + shift - 0x1B : yabai -m space --gap rel:-5 && yabai -m space --padding rel:-5:-5:-5:-5
# create desktop and follow focus - uses jq for parsing json (brew install jq)
ctrl + alt - t : yabai -m space --create && \
index="$(yabai -m query --spaces --display | jq 'map(select(."is-native-fullscreen" == false))[-1].index')" && \
yabai -m space --focus "${index}" && \
sketchybar -m --trigger space_change && hs -c "hs.alert.show('New Space Created')"
# create desktop, move window and follow focus - uses jq for parsing json (brew install jq)
ctrl + shift - t : yabai -m space --create && \
index="$(yabai -m query --spaces --display | jq 'map(select(."is-native-fullscreen" == false))[-1].index')" && \
yabai -m window --space "${index}" && \
yabai -m space --focus "${index}" && \
sketchybar -m --trigger space_change && hs -c "hs.alert.show('Window Moved To New Space')"
# destroy desktop
ctrl + alt - w : yabai -m space --destroy && yabai -m window --focus recent && sketchybar -m --trigger space_change && hs -c "hs.alert.show('Space Destroyed')"
# focus a specific desktop (auto create desktops if it doesn't exist?)
ctrl - 1 : yabai -m space --focus 1
ctrl - 2 : yabai -m space --focus 2
ctrl - 3 : yabai -m space --focus 3
ctrl - 4 : yabai -m space --focus 4
ctrl - 5 : yabai -m space --focus 5
ctrl - 6 : yabai -m space --focus 6
ctrl - 7 : yabai -m space --focus 7
ctrl - 8 : yabai -m space --focus 8
ctrl - 9 : yabai -m space --focus 9
ctrl - 0x32 : yabai -m space --focus last
# send window to specific space and follow focus
ctrl + alt - 1 : yabai -m window --space 1 && yabai -m space --focus 1
ctrl + alt - 2 : yabai -m window --space 2 && yabai -m space --focus 2
ctrl + alt - 3 : yabai -m window --space 3 && yabai -m space --focus 3
ctrl + alt - 4 : yabai -m window --space 4 && yabai -m space --focus 4
ctrl + alt - 5 : yabai -m window --space 5 && yabai -m space --focus 5
ctrl + alt - 6 : yabai -m window --space 6 && yabai -m space --focus 6
ctrl + alt - 7 : yabai -m window --space 7 && yabai -m space --focus 7
ctrl + alt - 8 : yabai -m window --space 8 && yabai -m space --focus 8
ctrl + alt - 9 : yabai -m window --space 9 && yabai -m space --focus 9
ctrl + alt - 0x32 : yabai -m window --space last && yabai -m space --focus 9
# swap space with give space SKETCH
ctrl + shift - 1 : yabai -m space --move 1 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Swapped With Space 1')"
ctrl + shift - 2 : yabai -m space --move 2 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Swapped With Space 2')"
ctrl + shift - 3 : yabai -m space --move 3 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Swapped With Space 3')"
ctrl + shift - 4 : yabai -m space --move 4 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Swapped With Space 4')"
ctrl + shift - 5 : yabai -m space --move 5 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Swapped With Space 5')"
ctrl + shift - 6 : yabai -m space --move 6 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Swapped With Space 6')"
ctrl + shift - 7 : yabai -m space --move 7 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Swapped With Space 7')"
ctrl + shift - 8 : yabai -m space --move 8 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Swapped With Space 8')"
ctrl + shift - 9 : yabai -m space --move 9 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Swapped With Space 9')"
ctrl + shift - 0x32 : yabai -m space --move last && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Swapped With Last Space')"
# send window to specific display
ctrl + alt + shift - 1 : yabai -m window --display 1 && yabai -m display --focus 1 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Moved Window To Display 1')"
ctrl + alt + shift - 2 : yabai -m window --display 2 && yabai -m display --focus 2 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Moved Window To Display 2')"
ctrl + alt + shift - 3 : yabai -m window --display 3 && yabai -m display --focus 3 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Moved Window To Display 3')"
ctrl + alt + shift - 4 : yabai -m window --display 4 && yabai -m display --focus 4 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Moved Window To Display 4')"
ctrl + alt + shift - 5 : yabai -m window --display 5 && yabai -m display --focus 5 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Moved Window To Display 5')"
ctrl + alt + shift - 6 : yabai -m window --display 6 && yabai -m display --focus 6 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Moved Window To Display 6')"
ctrl + alt + shift - 7 : yabai -m window --display 7 && yabai -m display --focus 7 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Moved Window To Display 7')"
ctrl + alt + shift - 8 : yabai -m window --display 8 && yabai -m display --focus 8 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Moved Window To Display 8')"
ctrl + alt + shift - 9 : yabai -m window --display 9 && yabai -m display --focus 9 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Moved Window To Display 9')"
ctrl + alt + shift - 0x32 : yabai -m window --display last && yabai -m display --focus 9 && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Moved Window To Last Display')"
# shortcut to focus specific display?
# fast focus desktop
ctrl - left : (yabai -m space --focus prev || yabai -m space --focus last) || skhd -k "ctrl + cmd - left"
ctrl - right : (yabai -m space --focus next || yabai -m space --focus first) || skhd -k "ctrl + cmd - right"
# send window to space and follow focus
ctrl + alt - left : (yabai -m window --space prev && yabai -m space --focus prev; hs -c "hs.alert.show('Moved Window Previous Space')") || (yabai -m window --space last && yabai -m space --focus last; hs -c "hs.alert.show('Moved Window Last Space')")
ctrl + alt - right : (yabai -m window --space next && yabai -m space --focus next; hs -c "hs.alert.show('Moved Window Next Space')") || (yabai -m window --space first && yabai -m space --focus first; hs -c "hs.alert.show('Moved Window First Space')")
# Move space left
ctrl + shift - left : (yabai -m space --move prev && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Moved Space Left')") || (yabai -m space --swap last && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Swapped With Last Space')")
# Move space right
ctrl + shift - right : (yabai -m space --move next && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Moved Space Right')") || (yabai -m space --swap first && sketchybar -m --trigger space_change; hs -c "hs.alert.show('Swapped With First Space')")
# Focus recent space
ctrl + alt - tab : yabai -m space --focus recent
# Focus recent display
ctrl + alt + shift - tab : yabai -m display --focus recent && sketchybar -m --trigger space_change
# Send window to recent space
# Swap space with recent space
# send window to display and follow focus
ctrl + alt + shift - left : (yabai -m window --display prev || yabai -m window --display last) && sketchybar -m --trigger space_change
ctrl + alt + shift - right : (yabai -m window --display next || yabai -m window --display first) && sketchybar -m --trigger space_change
# focus monitor
alt - tab : (yabai -m display --focus next) || (yabai -m display --focus first) && sketchybar -m --trigger space_change
alt + shift - tab : (yabai -m display --focus prev) || (yabai -m display --focus last) && sketchybar -m --trigger space_change
# reload yabai and skhdrc
ctrl + alt + shift - r : launchctl kickstart -k "gui/${UID}/homebrew.mxcl.yabai" && sudo yabai --load-sa && skhd --reload && killall limelight &> /dev/null \
limelight -c ~/.limelightrc &> /dev/null & \
sketchybar -m --update
# open terminal
ctrl - return : ~/.scripts/.terminal
# run terminal application
# ctrl + alt - a : sketchybar -m --bar hidden=toggle && compgen -abc | dmenu-mac -p "Launch" | xargs ~/.scripts/.terminal && sketchybar -m --bar hidden=toggle