-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkhdrc
154 lines (120 loc) · 6.85 KB
/
khdrc
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
# reload config
cmd + alt + ctrl - r : khd -e "reload"
# open terminal, blazingly fast compared to iTerm/Hyper
cmd - return : open -na /Applications/Kitty.app
# 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
alt - h : if [[ "$(chunkc tiling::query --window name)" != *"vim"* ]]; then chunkc tiling::window --focus west; fi
alt - j : if [[ "$(chunkc tiling::query --window name)" != *"vim"* ]]; then chunkc tiling::window --focus south; fi
alt - k : if [[ "$(chunkc tiling::query --window name)" != *"vim"* ]]; then chunkc tiling::window --focus north; fi
alt - l : if [[ "$(chunkc tiling::query --window name)" != *"vim"* ]]; then chunkc tiling::window --focus east; fi
# 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
ctrl + alt + cmd - h : chunkc tiling::window --warp west
ctrl + alt + cmd - j : chunkc tiling::window --warp sourth
ctrl + alt + cmd - k : chunkc tiling::window --warp north
ctrl + alt + cmd - l : chunkc tiling::window --warp east
# make floating window fill screen
ctrl + alt + cmd - up : chunkc tiling::window --grid-layout 1:1:0:0:1:1
# make floating window fill left-half of screen
ctrl + alt + cmd - left : chunkc tiling::window --grid-layout 1:2:0:0:1:1
# make floating window fill right-half of screen
ctrl + alt + cmd - right : chunkc tiling::window --grid-layout 1:2:1:0:1:1
# move floating windows / windows on a grid space
# 10 rows 10 cols grid, windows left and top on 0 grid, and have 5 grid width 5 grid height
alt - q : chunkc tiling::window --grid-layout 10:10:0:0:5:5
# 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
ctrl + alt + shift - 1 : chunkc tiling::window --send-to-desktop 1
ctrl + alt + shift - 2 : chunkc tiling::window --send-to-desktop 1
ctrl + alt + shift - 3 : chunkc tiling::window --send-to-desktop 1
ctrl + alt + shift - 4 : chunkc tiling::window --send-to-desktop 1
ctrl + alt + shift - 5 : chunkc tiling::window --send-to-desktop 1
ctrl + alt + shift - 6 : chunkc tiling::window --send-to-desktop 1
ctrl + alt + shift - 7 : chunkc tiling::window --send-to-desktop 1
# send window to desktop and switch desktop
shift + cmd - x : `id=$(chunkc get _last_active_desktop); chunkc tiling::window -d $id; khd -p "cmd + alt - $id" &> /dev/null`
ctrl + alt + cmd - z : chunkc tiling::window -d prev; khd -p "cmd + alt - z"
ctrl + alt + cmd - c : chunkc tiling::window -d next; khd -p "cmd + alt - c"
ctrl + alt + cmd - 1 : chunkc tiling::window -d 1; khd -p "cmd + alt - 1"
ctrl + alt + cmd - 2 : chunkc tiling::window -d 2; khd -p "cmd + alt - 2"
ctrl + alt + cmd - 3 : chunkc tiling::window -d 3; khd -p "cmd + alt - 3"
ctrl + alt + cmd - 4 : chunkc tiling::window -d 4; khd -p "cmd + alt - 4"
ctrl + alt + cmd - 5 : chunkc tiling::window -d 5; khd -p "cmd + alt - 5"
ctrl + alt + cmd - 6 : chunkc tiling::window -d 6; khd -p "cmd + alt - 6"
# switch to last active desktop
cmd + alt - x : `id=$(chunkc get _last_active_desktop); khd -p "cmd + alt - $id" &> /dev/null`
# 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 - down : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge south
alt - up : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge north
alt - right : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge east
# decrease region size
cmd + alt - right : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge west
cmd + alt - up : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge south
cmd + alt - down : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge north
cmd + alt - left : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge east
# set insertion point for focused container
cmd + alt - f : chunkc tiling::window --use-insertion-point cancel
cmd + alt - h : chunkc tiling::window --use-insertion-point west
cmd + alt - j : chunkc tiling::window --use-insertion-point south
cmd + alt - k : chunkc tiling::window --use-insertion-point north
cmd + 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
ctrl + alt + cmd - f : chunkc tiling::window --toggle fullscreen
# toggle window native fullscreen
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 and center on screen
alt - 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 - 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 + cmd - b : chunkc tiling::desktop --layout bsp
ctrl + alt + cmd - m : chunkc tiling::desktop --layout monocle
ctrl + alt + cmd - f : chunkc tiling::desktop --layout float
ctrl + alt - w : chunkc tiling::desktop --deserialize ~/.chunkwm_layouts/dev_1
# key remap for norwegian layout \ { }
cmd - 7 : khd -p "shift + alt - 7"
cmd - 8 : khd -p "shift + alt - 8"
cmd - 9 : khd -p "shift + alt - 9"