This repository has been archived by the owner on Oct 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
skhdrc
166 lines (140 loc) · 8.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
# 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.
# Define the modes
# prefix is to activate other modes, it consumes all key presses
# manage is to manage chunkwm, it consumes all key presses
# insert is to be free of all key bindings
:: default : chunkc border::color 0xFF6699CC
:: prefix @ : chunkc border::color 0xFFFAC863
:: nobind : chunkc border::color 0xFFF99157
:: manage @ : chunkc border::color 0xFFC594C5
prefix, nobind, manage < escape ; default
ctrl - k ; prefix
prefix < i ; nobind
prefix < m ; manage
# Rebalance BSP Tree
prefix < cmd + shift - r : chunkc tiling::desktop --equalize; qes -k "escape"
# Change the split mode of the current node (\)
prefix < 0x2A : chunkc tiling::window --toggle split; qes -k "escape"
# Toggle window state of focused node
prefix < shift - f : chunkc tiling::window --toggle fullscreen; qes -k "escape"
prefix < p : chunkc tiling::window --toggle parent; qes -k "escape"
prefix < shift - w : chunkc tiling::window --toggle float; qes -k "escape"
# Move focused window to display
prefix < cmd - 1 : chunkc tiling::window --send-to-monitor 1; qes -k "escape"
prefix < cmd - 2 : chunkc tiling::window --send-to-monitor 2; qes -k "escape"
# Move focused window to space
prefix < shift - 1 : chunkc tiling::window --send-to-desktop 1; qes -k "escape"
prefix < shift - 2 : chunkc tiling::window --send-to-desktop 2; qes -k "escape"
prefix < shift - 3 : chunkc tiling::window --send-to-desktop 3; qes -k "escape"
# Set space tiling mode
prefix < b : chunkc tiling::desktop --layout bsp; qes -k "escape"
prefix < f : chunkc tiling::desktop --layout monocle; qes -k "escape"
prefix < w : chunkc tiling::desktop --layout float; qes -k "escape"
# Rotate tree 90 clockwise
prefix < cmd - r : chunkc tiling::desktop --rotate 90; qes -k "escape"
# Restore code layout
prefix < c : chunkc tiling::desktop --deserialize ~/.chunkwm_layouts/code; qes -k "escape"
# Expand focused window in direction
manage < cmd - h : chunkc tiling::window --use-temporary-ratio 0.025 --adjust-window-edge west
manage < cmd - j : chunkc tiling::window --use-temporary-ratio 0.025 --adjust-window-edge south
manage < cmd - k : chunkc tiling::window --use-temporary-ratio 0.025 --adjust-window-edge north
manage < cmd - l : chunkc tiling::window --use-temporary-ratio 0.025 --adjust-window-edge east
# Reduce focused window in direction
manage < cmd + shift - h : chunkc tiling::window --use-temporary-ratio -0.025 --adjust-window-edge west
manage < cmd + shift - j : chunkc tiling::window --use-temporary-ratio -0.025 --adjust-window-edge south
manage < cmd + shift - k : chunkc tiling::window --use-temporary-ratio -0.025 --adjust-window-edge north
manage < cmd + shift - l : chunkc tiling::window --use-temporary-ratio -0.025 --adjust-window-edge east
# Container Gaps
manage < g : chunkc tiling::desktop --gap inc
manage < shift - g : chunkc tiling::desktop --gap dec
# Increase Screen Padding
manage < p : chunkc tiling::desktop --padding inc
manage < shift - p : chunkc tiling::desktop --padding dec
# Global keybinds
# Open new iTerm window
cmd - return : exec ~/bin/open-iTerm.applescript
# Focus window in direction
cmd + alt - h : chunkc tiling::window --focus west
cmd + alt - j : chunkc tiling::window --focus south
cmd + alt - k : chunkc tiling::window --focus north
cmd + alt - l : chunkc tiling::window --focus east
cmd + alt - c : chunkc tiling::window --focus next
cmd + alt + shift - c : chunkc tiling::window --focus prev
# Swap Focused Window
ctrl + alt - h : chunkc tiling::window --swap west
ctrl + alt - j : chunkc tiling::window --swap south
ctrl + alt - k : chunkc tiling::window --swap north
ctrl + alt - l : chunkc tiling::window --swap east
# Detach Focused Window And Reinsert In Direction
ctrl + shift - h : chunkc tiling::window --warp west
ctrl + shift - j : chunkc tiling::window --warp south
ctrl + shift - k : chunkc tiling::window --warp north
ctrl + shift - l : chunkc tiling::window --warp east
# Set next insertion point in direction
ctrl + cmd - h : chunkc tiling::window --use-insertion-point west
ctrl + cmd - j : chunkc tiling::window --use-insertion-point south
ctrl + cmd - k : chunkc tiling::window --use-insertion-point north
ctrl + cmd - l : chunkc tiling::window --use-insertion-point east
ctrl + cmd - c : chunkc tiling::window --use-insertion-point cancel
# Cycle focus though displays
cmd + alt - p : chunkc tiling::monitor -f prev
cmd + alt - n : chunkc tiling::monitor -f next
# Cycle focus though spaces
cmd + alt - 0x21 : chunkc tiling::desktop --focus prev
#cmd + alt - 0x21 : qes -k "ctrl - left"
cmd + alt - 0x1E : chunkc tiling::desktop --focus next
#cmd + alt - 0x1E : qes -k "ctrl - right"