-
Notifications
You must be signed in to change notification settings - Fork 1
/
.skhdrc
97 lines (75 loc) · 4.08 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
# focus window
alt - h : yabai -m window --focus west || yabai -m display --focus west
alt - j : yabai -m window --focus south || yabai -m display --focus south
alt - k : yabai -m window --focus north || yabai -m display --focus north
alt - l : yabai -m window --focus east || yabai -m display --focus east
# focus within stacks
alt - i : yabai -m query --spaces --space \
| jq -re ".index" \
| xargs -I{} yabai -m query --windows --space {} \
| jq -sre 'add | map(select(."is-minimized"==false)) | . as $array | length as $array_length | index(map(select(."has-focus"==true))) as $has_index | if $has_index > 0 then nth($has_index - 1).id else nth($array_length - 1).id end' \
| xargs -I{} yabai -m window --focus {}
alt - o : yabai -m query --spaces --space \
| jq -re ".index" \
| xargs -I{} yabai -m query --windows --space {} \
| jq -sre 'add | map(select(."is-minimized"==false)) | . as $array | length as $array_length | index(map(select(."has-focus"==true))) as $has_index | if $array_length - 1 > $has_index then nth($has_index + 1).id else nth(0).id end' \
| xargs -I{} yabai -m window --focus {}
# stack windows in space
alt - s : yabai -m window --stack prev || yabai -m window --stack next
# unstack windows in space
alt - e : yabai -m window --toggle float && yabai -m window --toggle float
# swap managed window
shift + alt - h : yabai -m window --swap west || yabai -m window --display west
shift + alt - l : yabai -m window --swap east || yabai -m window --display east
shift + alt - j : yabai -m window --swap south || yabai -m window --display south
shift + alt - k : yabai -m window --swap north || yabai -m window --display north
# move managed window
shift + cmd - h : yabai -m window --warp east
# balance size of windows
shift + alt - 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
# create desktop, move window and follow focus - uses jq for parsing json (brew install jq)
shift + cmd - n : 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}"
# fast focus desktop
cmd + alt - x : yabai -m space --focus recent
cmd + alt - 1 : yabai -m space --focus 1
# send window to desktop and follow focus
shift + cmd - z : yabai -m window --space next; yabai -m space --focus next
shift + cmd - 1 : yabai -m window --space 1; yabai -m space --focus 1
shift + cmd - 2 : yabai -m window --space 2; yabai -m space --focus 2
shift + cmd - 3 : yabai -m window --space 3; yabai -m space --focus 3
# focus monitor
ctrl + alt - z : yabai -m display --focus prev
ctrl + alt - 3 : yabai -m display --focus 3
# send window to monitor and follow focus
ctrl + cmd - c : yabai -m window --display next; yabai -m display --focus next
ctrl + cmd - 1 : yabai -m window --display 1; yabai -m display --focus 1
# move floating window
shift + ctrl - a : yabai -m window --move rel:-20:0
shift + ctrl - s : yabai -m window --move rel:0:20
# increase window size
shift + alt - a : yabai -m window --resize left:-20:0
shift + alt - d : yabai -m window --resize left:20:0
shift + alt - w : yabai -m window --resize top:0:-20
# decrease window size
shift + cmd - s : yabai -m window --resize bottom:0:-20
shift + cmd - w : yabai -m window --resize top:0:20
# set insertion point in focused container
ctrl + alt - h : yabai -m window --insert west
## toggle window zoom
shift + alt - d : yabai -m window --toggle zoom-parent
shift + alt - f : yabai -m window --toggle zoom-fullscreen
## 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 --grid 4:4:1:1:2:2
# toggle sticky(+float), topmost, picture-in-picture
alt - p : yabai -m window --toggle sticky --toggle topmost --toggle pip
## toggle window split type
alt - r : yabai -m space --rotate 90