-
Notifications
You must be signed in to change notification settings - Fork 0
/
.skhdrc
168 lines (136 loc) · 7.25 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
# open emacs
shift + cmd - return : cd ~ && /Applications/kitty.app/Contents/MacOS/kitty
# focus window
#shift + alt - x : yabai -m window --focus recent
meh - b : yabai -m window --focus west
meh - n : yabai -m window --focus south
meh - p : yabai -m window --focus north
meh - f : yabai -m window --focus east
meh - z : yabai -m window --focus stack.prev
meh - c : yabai -m window --focus stack.next
# swap window
#shift + cmd - x : yabai -m window --swap recent
lctrl + lalt + cmd - b : yabai -m window --swap west
lctrl + lalt + cmd - n : yabai -m window --swap south
lctrl + lalt + cmd - p : yabai -m window --swap north
lctrl + lalt + cmd - f : yabai -m window --swap east
# move window
hyper - b : yabai -m window --warp west
hyper - n : yabai -m window --warp south
hyper - p : yabai -m window --warp north
hyper - f : yabai -m window --warp east
# balance size of windows
hyper - 0 : yabai -m space --balance
# make floating window fill screen
# shift + alt - up : yabai -m window --grid 1:1:0:0:1:1
# make floating window fill left-half of screen
# shift + alt - left : yabai -m window --grid 1:2:0:0:1:1
# make floating window fill right-half of screen
# shift + alt - right : yabai -m window --grid 1:2:1:0:1:1
# create space, move window and follow focus - uses jq for parsing json (brew install jq)
shift + cmd - h : 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}"
# create space and follow focus - uses jq for parsing json (brew install jq)
cmd + alt - h : yabai -m space --create && \
index="$(yabai -m query --spaces --display | jq 'map(select(."native-fullscreen" == 0))[-1].index')" && \
yabai -m space --focus "${index}"
# destroy space
meh - w : yabai -m space --destroy
# fast focus space
# kinda broken in combination with sending window to different space
# shift + alt - x : yabai -m space --focus recent
meh - left : yabai -m space --focus prev #|| skhd -k "ctrl + alt + cmd - z"
meh - right : yabai -m space --focus next #|| skhd -k "ctrl + alt + cmd - c"
meh - 1 : yabai -m space --focus 1 #|| skhd -k "ctrl + alt + cmd - 1"
meh - 2 : yabai -m space --focus 2 #|| skhd -k "ctrl + alt + cmd - 2"
meh - 3 : yabai -m space --focus 3 #|| skhd -k "ctrl + alt + cmd - 3"
meh - 4 : yabai -m space --focus 4 #|| skhd -k "ctrl + alt + cmd - 4"
meh - 5 : yabai -m space --focus 5 #|| skhd -k "ctrl + alt + cmd - 5"
meh - 6 : yabai -m space --focus 6 #|| skhd -k "ctrl + alt + cmd - 6"
meh - 7 : yabai -m space --focus 7 #|| skhd -k "ctrl + alt + cmd - 7"
meh - 8 : yabai -m space --focus 8 #|| skhd -k "ctrl + alt + cmd - 8"
meh - 9 : yabai -m space --focus 9 #|| skhd -k "ctrl + alt + cmd - 9"
meh - 0 : yabai -m space --focus 10 #|| skhd -k "ctrl + alt + cmd - 0"
# send window to space and follow focus
#ctrl + shift + alt - x : yabai -m window --space recent && yabai -m space --focus recent
hyper - left : yabai -m window --space prev && yabai -m space --focus prev
hyper - right : yabai -m window --space next && yabai -m space --focus next
hyper - 1 : yabai -m window --space 1 && yabai -m space --focus 1
hyper - 2 : yabai -m window --space 2 && yabai -m space --focus 2
hyper - 3 : yabai -m window --space 3 && yabai -m space --focus 3
hyper - 4 : yabai -m window --space 4 && yabai -m space --focus 4
hyper - 5 : yabai -m window --space 5 && yabai -m space --focus 5
hyper - 6 : yabai -m window --space 6 && yabai -m space --focus 6
hyper - 7 : yabai -m window --space 7 && yabai -m space --focus 7
hyper - 8 : yabai -m window --space 8 && yabai -m space --focus 8
hyper - 9 : yabai -m window --space 9 && yabai -m space --focus 9
# ctrl + shift + alt - 0 : yabai -m window --space 10 && yabai -m space --focus 10
# focus monitor
meh - o : yabai -m display --focus recent
#shift + alt - q : yabai -m display --focus prev # semicolon
#shift + alt - j : yabai -m display --focus next
# the illogical numbering is cause yabai can't redefine monitor order :(
# shift + alt - 1 : yabai -m display --focus 1
# shift + alt - 2 : yabai -m display --focus 2
# shift + alt - 3 : yabai -m display --focus 3
# send window to monitor and follow focus
hyper - o : yabai -m window --display recent && yabai -m display --focus recent
# ctrl + shift + alt - q : yabai -m window --display prev && yabai -m display --focus prev
# ctrl + shift + alt - j : yabai -m window --display next && yabai -m display --focus next
# ctrl + shift + alt - 1 : yabai -m window --display 1 && yabai -m display --focus 1
# ctrl + shift + alt - 2 : yabai -m window --display 2 && yabai -m display --focus 2
# ctrl + shift + alt - 3 : yabai -m window --display 3 && yabai -m display --focus 3
# move window
hyper - b : yabai -m window --move rel:-20:0
hyper - n : yabai -m window --move rel:0:20
hyper - p : yabai -m window --move rel:0:-20
hyper - f : yabai -m window --move rel:20:0
# increase window fn
lctrl + lalt + cmd - left : yabai -m window --resize left:-20:0
lctrl + lalt + cmd - down : yabai -m window --resize bottom:0:20
lctrl + lalt + cmd - up : yabai -m window --resize top:0:-20
lctrl + lalt + cmd - right : yabai -m window --resize right:20:0
# decrease window size
# (not needed -- just cycle and then increase other window size)
# fn + shift - right : yabai -m window --resize left:20:0
# shift - fn - down : yabai -m window --resize bottom:0:-20
# shift - f18 : yabai -m window --resize top:0:20
# shift - f19 : yabai -m window --resize right:-20:0
# set insertion point in focused container
# ctrl + alt - b : yabai -m window --insert west
# ctrl + alt - n : yabai -m window --insert south
# ctrl + alt - p : yabai -m window --insert north
# ctrl + alt - e : yabai -m window --insert east
# ctrl + alt - i : yabai -m window --insert stack
# rotate tree
hyper - space : yabai -m space --rotate 90
# mirror tree y-axis
hyper - y : yabai -m space --mirror y-axis
# mirror tree x-axis
hyper - x : yabai -m space --mirror x-axis
# toggle desktop offset
# shift + alt - g : yabai -m space --toggle padding && yabai -m space --toggle gap
# toggle window parent zoom
# alt - d : yabai -m window --toggle zoom-parent
# toggle window fullscreen zoom
# alt - m : yabai -m window --toggle zoom-fullscreen
# toggle window native fullscreen
# shift + alt - m : yabai -m window --toggle native-fullscreen
# toggle window split type
# alt - e : yabai -m window --toggle split
# float / unfloat window and restore position
# alt - t : yabai -m window --toggle float && /tmp/yabai-restore/$(yabai -m query --windows --window | jq -re '.id').restore 2>/dev/null || true
shift + alt - t : yabai -m window --toggle float && yabai -m window --grid 4:4:1:1:2:2
# toggle sticky (show on all spaces)
ctrl + shift + alt - s : yabai -m window --toggle sticky
# toggle topmost (keep above other windows)
shift + alt - c : yabai -m window --toggle topmost
# toggle picture-in-picture
shift + alt - j : yabai -m window --toggle border && \
yabai -m window --toggle pip
# change layout of desktop
ctrl + alt - a : yabai -m space --layout bsp
ctrl + alt - o : yabai -m space --layout float
ctrl + alt - e : yabai -m space --layout $(yabai -m query --spaces --space | jq -r 'if .type == "bsp" then "float" else "bsp" end')