Skip to content

Commit 3fcd541

Browse files
committed
Replace chunkwm/khd with yabai/skhd
Things are just barely working, needs more setup.
1 parent c0fdbee commit 3fcd541

File tree

4 files changed

+154
-244
lines changed

4 files changed

+154
-244
lines changed

.chunkwmrc

Lines changed: 0 additions & 90 deletions
This file was deleted.

.khdrc

Lines changed: 0 additions & 154 deletions
This file was deleted.

.skhdrc

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# KWM -> ChunkWM -> Yabai -> ?
2+
# This was originally for khd, now called shkd
3+
4+
# swap managed window
5+
shift + alt - h : yabai -m window --swap north
6+
7+
# move managed window
8+
shift + cmd - h : yabai -m window --warp east
9+
10+
# balance size of windows
11+
shift + alt - 0 : yabai -m space --balance
12+
13+
# make floating window fill screen
14+
shift + alt - up : yabai -m window --grid 1:1:0:0:1:1
15+
16+
# make floating window fill left-half of screen
17+
shift + alt - left : yabai -m window --grid 1:2:0:0:1:1
18+
19+
# create desktop, move window and follow focus - uses jq for parsing json (brew install jq)
20+
shift + cmd - n : yabai -m space --create && \
21+
index="$(yabai -m query --spaces --display | jq 'map(select(."native-fullscreen" == 0))[-1].index')" && \
22+
yabai -m window --space "${index}" && \
23+
yabai -m space --focus "${index}"
24+
25+
26+
# send window to desktop and follow focus
27+
shift + cmd - z : yabai -m window --space next; yabai -m space --focus next
28+
shift + cmd - 2 : yabai -m window --space 2; yabai -m space --focus 2
29+
30+
# focus monitor
31+
ctrl + alt - z : yabai -m display --focus prev
32+
ctrl + alt - 3 : yabai -m display --focus 3
33+
34+
# send window to monitor and follow focus
35+
ctrl + cmd - c : yabai -m window --display next; yabai -m display --focus next
36+
ctrl + cmd - 1 : yabai -m window --display 1; yabai -m display --focus 1
37+
38+
# move floating window
39+
shift + ctrl - a : yabai -m window --move rel:-20:0
40+
shift + ctrl - s : yabai -m window --move rel:0:20
41+
42+
43+
# set insertion point in focused container
44+
ctrl + alt - h : yabai -m window --insert west
45+
46+
# toggle window zoom
47+
alt - d : yabai -m window --toggle zoom-parent
48+
alt - f : yabai -m window --toggle zoom-fullscreen
49+
50+
# toggle window split type
51+
alt - e : yabai -m window --toggle split
52+
53+
# float / unfloat window and center on screen
54+
alt - t : yabai -m window --toggle float;\
55+
# yabai -m window --grid 4:4:1:1:2:2
56+
57+
# toggle sticky(+float), topmost, picture-in-picture
58+
alt - p : yabai -m window --toggle sticky;\
59+
yabai -m window --toggle topmost;\
60+
yabai -m window --toggle pip
61+
62+
######
63+
## TODO: port old bindings from khd days
64+
######
65+
#####
66+
cmd + alt + ctrl - q : chunkc quit
67+
68+
# Reload Khd config
69+
cmd + shift - r : khd -e "reload"
70+
71+
# Set focus (vim bindings)
72+
cmd - h : yabai -m window --focus west
73+
cmd - h : yabai -m window --focus west
74+
cmd - j : yabai -m window --focus south
75+
cmd - k : yabai -m window --focus north
76+
cmd - l : yabai -m window --focus east
77+
78+
# Set focus (arrow bindings)
79+
cmd - left : chunkc -m window --focus west
80+
cmd - down : chunkc -m window --focus south
81+
cmd - up : chunkc -m window --focus north
82+
cmd - right : chunkc -m window --focus east
83+
84+
# Set focused monitor
85+
# cmd + shift - left : chunkc -m monitor -f prev
86+
# cmd + shift - right : chunkc -m monitor -f next
87+
88+
# Switch back to previous workspace
89+
# cmd - 0x32 : `id=$(chunkc get _last_active_desktop); khd -p "cmd - $id" &> /dev/null`
90+
# cmd - tab : `khd -p "ctrl - right" &> /dev/null`
91+
# shift + cmd - tab : `khd -p "ctrl - left" &> /dev/null`
92+
93+
# Modes
94+
cmd - e : chunkc -m window --toggle split
95+
96+
# Launch terminal
97+
cmd - return : open -na /Applications/iTerm.app
98+
cmd + shift - escape : /Users/agoolcharan/Dev/alacritty/target/release/alacritty -e htop
99+
cmd - c : open -na /Applications/Google\ Chrome.app
100+
cmd - d : open -na /Applications/Launchpad.app
101+
cmd - x : /Users/agoolcharan/bin/lock
102+
103+
# Set Space Tiling Mode To BSP
104+
cmd + alt + ctrl - b : kwmc space -t bsp
105+
106+
# Set Space Tiling Mode To Monocle
107+
cmd + alt + ctrl - m : kwmc space -t monocle
108+
109+
# Set Space Tiling Mode To Floating
110+
111+
# fast focus desktop
112+
cmd - 0x32 : yabai -m space --focus recent
113+
cmd - 1 : yabai -m space --focus 1
114+
cmd - 2 : yabai -m space --focus 2
115+
cmd - 3 : yabai -m space --focus 3

0 commit comments

Comments
 (0)