]> git.r.bdr.sh - rbdr/dotfiles/blame_incremental - skhdrc
Update dependencies
[rbdr/dotfiles] / skhdrc
... / ...
CommitLineData
1# NOTE(koekeishiya): A list of all built-in modifier and literal keywords can
2# be found at https://github.com/koekeishiya/skhd/issues/1
3#
4# A hotkey is written according to the following rules:
5#
6# hotkey = <mode> '<' <action> | <action>
7#
8# mode = 'name of mode' | <mode> ',' <mode>
9#
10# action = <keysym> '[' <proc_map_lst> ']' | <keysym> '->' '[' <proc_map_lst> ']'
11# <keysym> ':' <command> | <keysym> '->' ':' <command>
12# <keysym> ';' <mode> | <keysym> '->' ';' <mode>
13#
14# keysym = <mod> '-' <key> | <key>
15#
16# mod = 'modifier keyword' | <mod> '+' <mod>
17#
18# key = <literal> | <keycode>
19#
20# literal = 'single letter or built-in keyword'
21#
22# keycode = 'apple keyboard kVK_<Key> values (0x3C)'
23#
24# proc_map_lst = * <proc_map>
25#
26# proc_map = <string> ':' <command> | <string> '~' |
27# '*' ':' <command> | '*' '~'
28#
29# string = '"' 'sequence of characters' '"'
30#
31# command = command is executed through '$SHELL -c' and
32# follows valid shell syntax. if the $SHELL environment
33# variable is not set, it will default to '/bin/bash'.
34# when bash is used, the ';' delimeter can be specified
35# to chain commands.
36#
37# to allow a command to extend into multiple lines,
38# prepend '\' at the end of the previous line.
39#
40# an EOL character signifies the end of the bind.
41#
42# -> = keypress is not consumed by skhd
43#
44# * = matches every application not specified in <proc_map_lst>
45#
46# ~ = application is unbound and keypress is forwarded per usual, when specified in a <proc_map>
47#
48# NOTE(koekeishiya): A mode is declared according to the following rules:
49#
50# mode_decl = '::' <name> '@' ':' <command> | '::' <name> ':' <command> |
51# '::' <name> '@' | '::' <name>
52#
53# name = desired name for this mode,
54#
55# @ = capture keypresses regardless of being bound to an action
56#
57# command = command is executed through '$SHELL -c' and
58# follows valid shell syntax. if the $SHELL environment
59# variable is not set, it will default to '/bin/bash'.
60# when bash is used, the ';' delimeter can be specified
61# to chain commands.
62#
63# to allow a command to extend into multiple lines,
64# prepend '\' at the end of the previous line.
65#
66# an EOL character signifies the end of the bind.
67
68# add an on_enter command to the default mode
69# :: default : chunkc border::color 0xff775759
70#
71# defines a new mode 'test' with an on_enter command, that captures keypresses
72# :: test @ : chunkc border::color 0xff24ccaa
73#
74# from 'default' mode, activate mode 'test'
75# cmd - x ; test
76#
77# from 'test' mode, activate mode 'default'
78# test < cmd - x ; default
79#
80# launch a new terminal instance when in either 'default' or 'test' mode
81# default, test < cmd - return : open -na /Applications/Terminal.app
82
83# application specific bindings
84#
85# cmd - n [
86# "kitty" : echo "hello kitty"
87# * : echo "hello everyone"
88# "qutebrowser" : echo "hello qutebrowser"
89# "terminal" ~
90# "finder" : false
91# ]
92
93# specify a file that should be included as an additional config-file.
94# treated as an absolutepath if the filename begins with '/' otherwise
95# the file is relative to the path of the config-file it was loaded from.
96#
97# .load "/Users/Koe/.config/partial_skhdrc"
98# .load "partial_skhdrc"
99
100# prevent skhd from monitoring events for specific applications.
101#
102# .blacklist [
103# "kitty"
104# "terminal"
105# "qutebrowser"
106# ]
107
108# open terminal, blazingly fast compared to iTerm/Hyper
109shift + alt - return : /Applications/kitty.app/Contents/MacOS/kitty --single-instance -d ~
110
111# open qutebrowser
112# cmd + shift - return : ~/Scripts/qtb.sh
113
114# open mpv
115# cmd - m : open -na /Applications/mpv.app $(pbpaste)
116
117# focus window
118alt - h : yabai -m window --focus west
119alt - j : yabai -m window --focus south
120alt - k : yabai -m window --focus north
121alt - l : yabai -m window --focus east
122
123# swap managed window
124shift + alt - h : yabai -m window --swap west
125shift + alt - j : yabai -m window --swap south
126shift + alt - k : yabai -m window --swap north
127shift + alt - l : yabai -m window --swap east
128
129# move managed window
130shift + ctrl + alt - h : yabai -m window --warp west
131shift + ctrl + alt - j : yabai -m window --warp south
132shift + ctrl + alt - k : yabai -m window --warp north
133shift + ctrl + alt - l : yabai -m window --warp east
134
135# balance size of windows
136shift + ctrl + alt - 0 : yabai -m space --balance
137
138# make floating window fill screen
139shift + alt - up : yabai -m window --grid 1:1:0:0:1:1
140
141# make floating window fill left-half of screen
142shift + alt - left : yabai -m window --grid 1:2:0:0:1:1
143shift + alt - right : yabai -m window --grid 1:2:1:0:1:1
144
145# create desktop, move window and follow focus - uses jq for parsing json (brew install jq)
146# shift + cmd - n : yabai -m space --create && \
147# index="$(yabai -m query --spaces --display | jq 'map(select(."is-native-fullscreen" == false))[-1].index')" && \
148# yabai -m window --space "${index}" && \
149# yabai -m space --focus "${index}"
150
151# fast focus desktop
152# cmd + alt - x : yabai -m space --focus recent
153# cmd + alt - 1 : yabai -m space --focus 1
154
155# send window to desktop and follow focus
156# shift + cmd - z : yabai -m window --space next; yabai -m space --focus next
157shift + alt - 1 : yabai -m window --space 1; yabai -m space --focus 1
158shift + alt - 2 : yabai -m window --space 2; yabai -m space --focus 2
159shift + alt - 3 : yabai -m window --space 3; yabai -m space --focus 3
160shift + alt - 4 : yabai -m window --space 4; yabai -m space --focus 4
161shift + alt - 5 : yabai -m window --space 5; yabai -m space --focus 5
162shift + alt - 6 : yabai -m window --space 6; yabai -m space --focus 6
163shift + alt - 7 : yabai -m window --space 7; yabai -m space --focus 7
164shift + alt - 8 : yabai -m window --space 8; yabai -m space --focus 8
165shift + alt - 9 : yabai -m window --space 9; yabai -m space --focus 9
166shift + alt - 0 : yabai -m window --space 10; yabai -m space --focus 10
167
168# focus monitor
169# ctrl + alt - z : yabai -m display --focus prev
170shift + ctrl - 1 : yabai -m display --focus 1
171shift + ctrl - 2 : yabai -m display --focus 2
172shift + ctrl - 3 : yabai -m display --focus 3
173
174# send window to monitor and follow focus
175# ctrl + cmd - c : yabai -m window --display next; yabai -m display --focus next
176# ctrl + cmd - 1 : yabai -m window --display 1; yabai -m display --focus 1
177shift + ctrl + alt - 1 : yabai -m window --display 1; yabai -m display --focus 1
178shift + ctrl + alt - 2 : yabai -m window --display 2; yabai -m display --focus 2
179shift + ctrl + alt - 3 : yabai -m window --display 3; yabai -m display --focus 3
180
181# move floating window
182# shift + ctrl - a : yabai -m window --move rel:-20:0
183# shift + ctrl - s : yabai -m window --move rel:0:20
184
185# increase window size
186shift + alt - a : yabai -m window --resize left:-20:0
187shift + alt - s : yabai -m window --resize bottom:0:20
188shift + alt - w : yabai -m window --resize top:0:-20
189shift + alt - d : yabai -m window --resize right:20:0
190
191# decrease window size
192# shift + cmd - s : yabai -m window --resize bottom:0:-20
193# shift + cmd - w : yabai -m window --resize top:0:20
194shift + ctrl+ alt - a : yabai -m window --resize right:-20:0
195shift + ctrl+ alt - s : yabai -m window --resize top:0:20
196shift + ctrl+ alt - w : yabai -m window --resize bottom:0:-20
197shift + ctrl+ alt - d : yabai -m window --resize left:20:0
198
199# set insertion point in focused container
200ctrl + alt - h : yabai -m window --insert west
201ctrl + alt - j : yabai -m window --insert south
202ctrl + alt - k : yabai -m window --insert north
203ctrl + alt - l : yabai -m window --insert east
204
205# toggle window zoom
206shift + alt - z : yabai -m window --toggle zoom-parent
207shift + ctrl + alt - z : yabai -m window --toggle zoom-fullscreen
208
209# toggle window split type
210shift + alt - e : yabai -m window --toggle split
211
212# float / unfloat window and center on screen
213shift + alt - t : yabai -m window --toggle float --grid 4:4:1:1:2:2
214
215# toggle sticky(+float), topmost, picture-in-picture
216shift + alt - p : yabai -m window --toggle sticky --toggle topmost --toggle pip
217
218# rotate tree
219shift + alt - r : yabai -m space --rotate 90
220
221# mirror tree y-axis
222shift + alt - y : yabai -m space --mirror y-axis
223
224# mirror tree x-axis
225shift + alt - x : yabai -m space --mirror x-axis