-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.skhdrc
280 lines (254 loc) · 11.1 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
## NOTE(koekeishiya): A list of all built-in modifier and literal keywords can
# be found at https://github.com/koekeishiya/skhd/issues/1
#
# A hotkey is written according to the following rules:
#
# hotkey = <keysym> ':' <command> |
# <keysym> '->' ':' <command>
#
# keysym = <mod> '-' <key> | <key>
#
# mod = 'built-in mod keyword' | <mod> '+' <mod>
#
# key = <literal> | <keycode>
#
# literal = 'single letter or built-in keyword'
#
# keycode = 'apple keyboard kVK_<Key> values (0x3C)'
#
# -> = keypress is not consumed by skhd
#
# command = command is executed through '$SHELL -c' and
# follows valid shell syntax. if the $SHELL environment
# variable is not set, it will default to '/bin/bash'.
# when bash is used, the ';' delimeter can be specified
# to chain commands.
#
# to allow a command to extend into multiple lines,
# prepend '\' at the end of the previous line.
#
# an EOL character signifies the end of the bind.
# start term
lalt - return : osascript ~/bin/.osa/run_term.scpt
lalt + lshift - return : osascript ~/bin/.osa/run_oterm.scpt
# start finder
lalt + lshift - f : osascript ~/bin/.osa/run_finder.scpt
# close window
lalt + lshift - c : yabai -m window --close
# restart
shift + alt - r : launchctl kickstart -k "gui/${UID}/homebrew.mxcl.yabai"
# focus window
lalt - h : yabai -m window --focus west
lalt - l : yabai -m window --focus east
lalt - j : yabai -m window --focus south
lalt - k : yabai -m window --focus north
# swap managed window
lshift + lalt - h : yabai -m window --swap west
lshift + lalt - l : yabai -m window --swap east
lshift + lalt - j : yabai -m window --swap south
lshift + lalt - k : yabai -m window --swap north
# move managed window
lshift + lcmd - h : yabai -m window --warp west
lshift + lcmd - l : yabai -m window --warp east
lshift + lcmd - j : yabai -m window --warp south
lshift + lcmd - k : yabai -m window --warp north
# toggle float on window
lalt - f : yabai -m window --toggle float
# toggle zoom
#lshift + lalt - f : yabai -m window --toggle zoom-parent
#lshift + lalt - f : yabai -m window --toggle zoom-fullscreen
# move floating window
lalt - left : yabai -m window --move rel:-20:0
lalt - right : yabai -m window --move rel:20:0
lalt - down : yabai -m window --move rel:0:20
lalt - up : yabai -m window --move rel:0:-20
# increase window size
lshift + lalt - left : yabai -m window --resize left:-20:0
lshift + lalt - right : yabai -m window --resize right:20:0
lshift + lalt - up : yabai -m window --resize top:0:-20
lshift + lalt - down : yabai -m window --resize bottom:0:20
# decrease window size
lctrl + lalt - right : yabai -m window --resize left:20:0
lctrl + lalt - left : yabai -m window --resize right:-20:0
lctrl + lalt - down : yabai -m window --resize top:0:20
lctrl + lalt - up : yabai -m window --resize bottom:0:-20
# balance size of windows
lshift + lalt - 0 : yabai -m space --balance
# create desktop, move window and follow focus - uses jq for parsing json (brew install jq)
lshift + lalt - n : yabai -m space --create && \
index="$(yabai -m query --spaces --display | jq 'map(select(."native-fullscreen" == 0))[-1].index')" && \
yabai -m window --space "${index}" && \
yabai -m space --focus "${index}"
# send window to desktop
lshift + lalt - 0x21 : yabai -m window --space prev
lshift + lalt - 0x1E : yabai -m window --space next
lshift + lalt - 1 : yabai -m window --space 1
lshift + lalt - 2 : yabai -m window --space 2
lshift + lalt - 3 : yabai -m window --space 3
lshift + lalt - 4 : yabai -m window --space 4
lshift + lalt - 5 : yabai -m window --space 5
lshift + lalt - 6 : yabai -m window --space 6
lshift + lalt - 7 : yabai -m window --space 7
lshift + lalt - 8 : yabai -m window --space 8
lshift + lalt - 9 : yabai -m window --space 9
# focus desktop
lalt - tab : yabai -m space --focus recent
lalt - 0x21 : yabai -m space --focus prev || yabai -m space --focus last
lalt - 0x1E : yabai -m space --focus next || yabai -m space --focus first
lalt - 1 : yabai -m space --focus 1
lalt - 2 : yabai -m space --focus 2
lalt - 3 : yabai -m space --focus 3
lalt - 4 : yabai -m space --focus 4
lalt - 5 : yabai -m space --focus 5
lalt - 6 : yabai -m space --focus 6
lalt - 7 : yabai -m space --focus 7
lalt - 8 : yabai -m space --focus 8
lalt - 9 : yabai -m space --focus 9
# focus monitor
#lalt - 0x2B : yabai -m display --focus prev || yabai -m display --focus last
#lalt - 0x2F : yabai -m display --focus next || yabai -m display --focus first
lalt - 0x2B : yabai -m display --focus west
lalt - 0x2F : yabai -m display --focus east
lctrl + lalt - 3 : yabai -m display --focus 3
lctrl + lalt - 2 : yabai -m display --focus 2
lctrl + lalt - 1 : yabai -m display --focus 1
# send window to monitor
lalt + lshift - 0x2B : yabai -m window --display west
lalt + lshift - 0x2F : yabai -m window --display east
lctrl + lalt + lshift - 1 : yabai -m window --display 1
lctrl + lalt + lshift - 2 : yabai -m window --display 2
lctrl + lalt + lshift - 3 : yabai -m window --display 3
# toggle window split type
# alt - e : yabai -m window --toggle split
# float / unfloat window and center on screen
# alt - t : yabai -m window --toggle float;\
# yabai -m window --grid 4:4:1:1:2:2
# toggle sticky(+float), topmost, picture-in-picture
# alt - p : yabai -m window --toggle sticky;\
# yabai -m window --toggle topmost;\
# yabai -m window --toggle pip
### Old chunkwm stuff below:
## close focused window
#shift + alt - c : chunkc tiling::window --close
#
## focus window
#alt - h : chunkc tiling::window --focus west
#alt - j : chunkc tiling::window --focus south
#alt - k : chunkc tiling::window --focus north
#alt - l : chunkc tiling::window --focus east
#
#cmd - j : chunkc tiling::window --focus prev
#cmd - k : chunkc tiling::window --focus next
#
## equalize size of windows
#shift + alt - 0 : chunkc tiling::desktop --equalize
#
## swap window
#shift + alt - h : chunkc tiling::window --swap west
#shift + alt - j : chunkc tiling::window --swap south
#shift + alt - k : chunkc tiling::window --swap north
#shift + alt - l : chunkc tiling::window --swap east
#
## move window
#shift + cmd - h : chunkc tiling::window --warp west
#shift + cmd - j : chunkc tiling::window --warp south
#shift + cmd - k : chunkc tiling::window --warp north
#shift + cmd - l : chunkc tiling::window --warp east
#
## move floating windows / windows on a floating space
#shift + alt - up : chunkc tiling::window --warp-floating fullscreen
#shift + alt - left : chunkc tiling::window --warp-floating left
#shift + alt - right : chunkc tiling::window --warp-floating right
#shift + cmd - left : chunkc tiling::window --warp-floating top-left
#shift + cmd - right : chunkc tiling::window --warp-floating top-right
#shift + ctrl - left : chunkc tiling::window --warp-floating bottom-left
#shift + ctrl - right : chunkc tiling::window --warp-floating bottom-right
#
## send window to desktop
##shift + alt - x : chunkc tiling::window --send-to-desktop $(chunkc get _last_active_desktop)
#shift + alt - 0x21 : chunkc tiling::window --send-to-desktop prev
#shift + alt - 0x1E : chunkc tiling::window --send-to-desktop next
#shift + alt - 1 : chunkc tiling::window --send-to-desktop 1
#shift + alt - 2 : chunkc tiling::window --send-to-desktop 2
#shift + alt - 3 : chunkc tiling::window --send-to-desktop 3
#shift + alt - 4 : chunkc tiling::window --send-to-desktop 4
#shift + alt - 5 : chunkc tiling::window --send-to-desktop 5
#shift + alt - 6 : chunkc tiling::window --send-to-desktop 6
#
## focus monitor
#alt - 0x2B : chunkc tiling::monitor -f prev
#alt - 0x2F : chunkc tiling::monitor -f next
#ctrl + alt - 1 : chunkc tiling::monitor -f 1
#ctrl + alt - 2 : chunkc tiling::monitor -f 2
#ctrl + alt - 3 : chunkc tiling::monitor -f 3
#
## send window to monitor and follow focus
#shift + alt - 0x2B : chunkc tiling::window --send-to-monitor prev; chunkc tiling::monitor -f prev
#shift + alt - 0x2F : chunkc tiling::window --send-to-monitor next; chunkc tiling::monitor -f next
#ctrl + cmd - 1 : chunkc tiling::window --send-to-monitor 1; chunkc tiling::monitor -f 1
#ctrl + cmd - 2 : chunkc tiling::window --send-to-monitor 2; chunkc tiling::monitor -f 2
#ctrl + cmd - 3 : chunkc tiling::window --send-to-monitor 3; chunkc tiling::monitor -f 3
#
## increase region size
#shift + alt - a : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge west
#shift + alt - s : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge south
#shift + alt - w : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge north
#shift + alt - d : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge east
#
## decrease region size
#shift + cmd - a : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge west
#shift + cmd - s : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge south
#shift + cmd - w : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge north
#shift + cmd - d : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge east
#
## set insertion point for focused container
##ctrl + alt - f : chunkc tiling::window --use-insertion-point cancel
##ctrl + alt - h : chunkc tiling::window --use-insertion-point west
##ctrl + alt - j : chunkc tiling::window --use-insertion-point south
##ctrl + alt - k : chunkc tiling::window --use-insertion-point north
##ctrl + alt - l : chunkc tiling::window --use-insertion-point east
#
## rotate tree
#alt - r : chunkc tiling::desktop --rotate 90
#
## mirror tree y-axis
#alt - y : chunkc tiling::desktop --mirror vertical
#
## mirror tree x-axis
#alt - x : chunkc tiling::desktop --mirror horizontal
#
## toggle desktop offset
#alt - a : chunkc tiling::desktop --toggle offset
#
## toggle window fullscreen
#alt - f : chunkc tiling::window --toggle fullscreen
#
## toggle window native fullscreen
#shift + alt - f : chunkc tiling::window --toggle native-fullscreen
#
## toggle window parent zoom
#alt - d : chunkc tiling::window --toggle parent
#
## toggle window split type
#alt - e : chunkc tiling::window --toggle split
#
## float / unfloat window
#alt - t : chunkc tiling::window --toggle float
#
## toggle sticky, float and resize to picture-in-picture size
#alt - s : chunkc tiling::window --toggle sticky;\
# chunkc tiling::window --warp-floating pip-right
#
## float next window to be tiled
#shift + alt - t : chunkc set window_float_next 1
#
## change layout of desktop
#ctrl + alt - a : chunkc tiling::desktop --layout bsp
#ctrl + alt - s : chunkc tiling::desktop --layout monocle
#ctrl + alt - d : chunkc tiling::desktop --layout float
#
## toggle mouse follow
#alt - space : chunkc core::load ffm.so
#ctrl + alt - space : chunkc core::unload ffm.so
#
##ctrl + alt - w : chunkc tiling::desktop --deserialize ~/.chunkwm_layouts/dev_1