# ################################################################ # # THE FOLLOWING IS AN EXPLANATION OF THE GRAMMAR THAT SKHD PARSES. # # FOR SIMPLE EXAMPLE MAPPINGS LOOK FURTHER DOWN THIS FILE.. # # ################################################################ # # 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 = 'name of mode' | ',' # # action = '[' ']' | '->' '[' # ']' # ':' | '->' ':' # ';' | '->' ';' # # keysym = '-' | # # mod = 'modifier keyword' | '+' # # key = | # # literal = 'single letter or built-in keyword' # # keycode = 'apple keyboard kVK_ values (0x3C)' # # proc_map_lst = * # # proc_map = ':' | '~' | # '*' ':' | '*' '~' # # string = '"' 'sequence of characters' '"' # # 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. # # -> = keypress is not consumed by skhd # # * = matches every application not specified in # # ~ = application is unbound and keypress is forwarded per usual, # when specified in a # # A mode is declared according to the following rules: # # mode_decl = '::' '@' ':' | '::' ':' | # '::' '@' | '::' # # 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. # ############################################################### # # THE FOLLOWING SECTION CONTAIN SIMPLE MAPPINGS DEMONSTRATING HOW # # TO INTERACT WITH THE YABAI WM. THESE ARE SUPPOSED TO BE USED AS # # A REFERENCE ONLY, WHEN MAKING YOUR OWN CONFIGURATION.. # # ############################################################### # # focus left window meh - h : yabai -m window --focus west # swap managed window meh - left : yabai -m window --swap west meh - right : yabai -m window --swap east meh - up : yabai -m window --swap north meh - down : yabai -m window --swap south # switch space mode meh - b : yabai -m space --layout bsp meh - f : yabai -m space --layout float meh - s : yabai -m space --layout stack # move focus window meh + cmd - left : yabai -m window --focus west meh + cmd - right : yabai -m window --focus east meh + cmd - up : yabai -m window --focus north meh + cmd - down : yabai -m window --focus south # restart yabai and skhd ctrl + alt + cmd - r : launchctl kickstart -k "gui/${UID}/homebrew.mxcl.yabai" && launchctl kickstart -k "gui/${UID}/homebrew.mxcl.skhd"