-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathskhdrc
237 lines (202 loc) · 10.8 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
# 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 = <mode> '<' <action> | <action>
#
# mode = 'name of mode' | <mode> ',' <mode>
#
# action = <keysym> ':' <command> | <keysym> '->' ':' <command>
# <keysym> ';' <mode> | <keysym> '->' ';' <mode>
#
# 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.
#
#
# NOTE(koekeishiya): A mode is declared according to the following rules:
#
# mode_decl = '::' <name> '@' ':' <command> | '::' <name> ':' <command> |
# '::' <name> '@' | '::' <name>
#
# name = desired name for this mode,
#
# @ = capture keypresses regardless of being bound to an action
#
# 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.
# add an on_enter command to the default mode
# :: default : chunkc border::color 0xff775759
#
# defines a new mode 'test' with an on_enter command, that captures keypresses
# :: test @ : chunkc border::color 0xff24ccaa
#
# from 'default' mode, activate mode 'test'
# cmd - x ; test
#
# from 'test' mode, activate mode 'default'
# test < cmd - x ; default
#
# launch a new terminal instance when in either 'default' or 'test' mode
# default, test < cmd - return : open -na /Applications/Terminal.app
# open terminal, blazingly fast compared to iTerm/Hyper
# cmd - return : open -na /Applications/iTerm.app
# open qutebrowser
# cmd + shift - return : ~/Scripts/qtb.sh
# close focused window
# alt - w : chunkc tiling::window --close
# focus window
# ctrl - h -> : if [[ "$(chunkc tiling::query --window name)" != *"tmux"* ]]; then chunkc tiling::window --focus west; fi
# ctrl - j -> : if [[ "$(chunkc tiling::query --window name)" != *"tmux"* ]]; then chunkc tiling::window --focus south; fi
# ctrl - k -> : if [[ "$(chunkc tiling::query --window name)" != *"tmux"* ]]; then chunkc tiling::window --focus north; fi
# ctrl - l -> : if [[ "$(chunkc tiling::query --window name)" != *"tmux"* ]]; then chunkc tiling::window --focus east; fi
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
alt + cmd - h : chunkc tiling::window --warp west
alt + cmd - j : chunkc tiling::window --warp south
alt + cmd - k : chunkc tiling::window --warp north
alt + cmd - l : chunkc tiling::window --warp east
# make floating window fill screen
alt + shift + ctrl + cmd - m : chunkc tiling::window --grid-layout 1:1:0:0:1:1
# make floating window fill left-half of screen
alt + shift + ctrl + cmd - h : chunkc tiling::window --grid-layout 1:2:0:0:1:1
# make floating window fill right-half of screen
alt + shift + ctrl + cmd - l : chunkc tiling::window --grid-layout 1:2:1:0:1:1
# fast focus desktop
alt - tab : chunkc tiling::desktop --focus $(chunkc get _last_active_desktop)
# alt - left : chunkc tiling::desktop --focus prev
# alt - right : chunkc tiling::desktop --focus next
alt - 1 : chunkc tiling::desktop --focus 1
alt - 2 : chunkc tiling::desktop --focus 2
alt - 3 : chunkc tiling::desktop --focus 3
alt - 4 : chunkc tiling::desktop --focus 4
alt - 5 : chunkc tiling::desktop --focus 5
alt - 6 : chunkc tiling::desktop --focus 6
alt - 7 : chunkc tiling::desktop --focus 7
alt - 8 : chunkc tiling::desktop --focus 8
alt - 9 : chunkc tiling::desktop --focus 9
# send window to desktop
shift + alt - x : chunkc tiling::window --send-to-desktop $(chunkc get _last_active_desktop)
shift + alt - z : chunkc tiling::window --send-to-desktop prev
shift + alt - c : 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
shift + alt - 7 : chunkc tiling::window --send-to-desktop 7
# send window to desktop and follow focus
shift + cmd - x : chunkc tiling::window --send-to-desktop $(chunkc get _last_active_desktop); chunkc tiling::desktop --focus $(chunkc get _last_active_desktop)
ctrl + alt + shift - z : chunkc tiling::window --send-to-desktop prev; chunkc tiling::desktop --focus prev
ctrl + alt + shift - c : chunkc tiling::window --send-to-desktop next; chunkc tiling::desktop --focus next
ctrl + alt + shift - 1 : chunkc tiling::window --send-to-desktop 1; chunkc tiling::desktop --focus 1
ctrl + alt + shift - 2 : chunkc tiling::window --send-to-desktop 2; chunkc tiling::desktop --focus 2
ctrl + alt + shift - 3 : chunkc tiling::window --send-to-desktop 3; chunkc tiling::desktop --focus 3
ctrl + alt + shift - 4 : chunkc tiling::window --send-to-desktop 4; chunkc tiling::desktop --focus 4
ctrl + alt + shift - 5 : chunkc tiling::window --send-to-desktop 5; chunkc tiling::desktop --focus 5
ctrl + alt + shift - 6 : chunkc tiling::window --send-to-desktop 6; chunkc tiling::desktop --focus 6
ctrl + alt + shift - 7 : chunkc tiling::window --send-to-desktop 7; chunkc tiling::desktop --focus 7
# focus monitor
ctrl + alt - z : chunkc tiling::monitor -f prev
ctrl + alt - c : 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
ctrl + cmd - z : chunkc tiling::window --send-to-monitor prev; chunkc tiling::monitor -f prev
ctrl + cmd - c : 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
alt - left : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge west
# alt + cmd - left
# alt + cmd - j
# alt + cmd - k
# alt + cmd - l
# shift - down : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge south
# shift - up : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge north
# shift - right : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge east
# decrease region size
alt - right : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge west
# shift + alt - up : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge south
# shift + alt - down : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge north
# shift + alt - left : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge east
# set insertion point for focused container
alt + shift - f : chunkc tiling::window --use-insertion-point cancel
alt + shift - h : chunkc tiling::window --use-insertion-point west
alt + shift - j : chunkc tiling::window --use-insertion-point south
alt + shift - k : chunkc tiling::window --use-insertion-point north
alt + shift - l : chunkc tiling::window --use-insertion-point east
# rotate tree
alt + shift + ctrl + cmd - r : chunkc tiling::desktop --rotate 90
# mirror tree y-axis
alt + shift + ctrl + cmd - y : chunkc tiling::desktop --mirror vertical
# mirror tree x-axis
alt + shift + ctrl + cmd - x : chunkc tiling::desktop --mirror horizontal
# toggle desktop offset
alt + shift + ctrl + cmd - a : chunkc tiling::desktop --toggle offset
# toggle window fullscreen
alt + shift + ctrl + cmd - f : chunkc tiling::window --toggle fullscreen
# toggle window native fullscreen
shift + alt - f : chunkc tiling::window --toggle native-fullscreen
# toggle window parent zoom
alt + shift + ctrl + cmd - d : chunkc tiling::window --toggle parent
# toggle window split type
alt + shift + ctrl + cmd - e : chunkc tiling::window --toggle split
# toggle window fade
alt + shift + ctrl + cmd - q : chunkc tiling::window --toggle fade
# float / unfloat window and center on screen
alt + shift + ctrl + cmd - t : chunkc tiling::window --toggle float;\
chunkc tiling::window --grid-layout 4:4:1:1:2:2
# toggle sticky, float and resize to picture-in-picture size
alt + shift + ctrl + cmd - s : chunkc tiling::window --toggle sticky;\
chunkc tiling::window --grid-layout 5:5:4:0:1:1
# float next window to be tiled
shift + alt - t : chunkc set window_float_next 1
# change layout of desktop
ctrl + alt + shift - b : chunkc tiling::desktop --layout bsp
ctrl + alt + shift - m : chunkc tiling::desktop --layout monocle
ctrl + alt + shift - f : chunkc tiling::desktop --layout float
ctrl + alt - w : chunkc tiling::desktop --deserialize ~/.chunkwm_layouts/dev_1