dotfiles/.config/skhd/skhdrc

103 lines
3.9 KiB
Plaintext

# ################################################################ #
# 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> '<' <action> | <action>
#
# mode = 'name of mode' | <mode> ',' <mode>
#
# action = <keysym> '[' <proc_map_lst> ']' | <keysym> '->' '['
# <proc_map_lst> ']'
# <keysym> ':' <command> | <keysym> '->' ':' <command>
# <keysym> ';' <mode> | <keysym> '->' ';' <mode>
#
# keysym = <mod> '-' <key> | <key>
#
# mod = 'modifier keyword' | <mod> '+' <mod>
#
# key = <literal> | <keycode>
#
# literal = 'single letter or built-in keyword'
#
# keycode = 'apple keyboard kVK_<Key> values (0x3C)'
#
# proc_map_lst = * <proc_map>
#
# proc_map = <string> ':' <command> | <string> '~' |
# '*' ':' <command> | '*' '~'
#
# 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 <proc_map_lst>
#
# ~ = application is unbound and keypress is forwarded per usual,
# when specified in a <proc_map>
#
# 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.
# ############################################################### #
# 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"