# -- restart yabai --
cmd + alt + ctrl - y : launchctl kickstart -k "gui/${UID}/homebrew.mxcl.yabai"
###################
# WINDOW MANAGEMENT
###################
# -- focusing within the current "space" --
hyper - h : yabai -m window --focus west
hyper - j : yabai -m window --focus south
hyper - k : yabai -m window --focus north
hyper - l : yabai -m window --focus east
# -- rearraging within the current "space" --
cmd + alt - h : yabai -m window --warp east
cmd + alt - j : yabai -m window --warp south
cmd + alt - k : yabai -m window --warp north
cmd + alt - l : yabai -m window --warp west
cmd + alt - u : yabai -m window --swap west
cmd + alt - i : yabai -m window --swap south
cmd + alt - o : yabai -m window --swap north
cmd + alt - p : yabai -m window --swap east
cmd + alt - r : yabai -m space --mirror y-axis
cmd + alt + shift - r : yabai -m space --rotate 90
# -- change split type of focused window --
cmd + alt - e : yabai -m window --toggle split
# -- resizing --
cmd + alt - 0 : yabai -m space --balance
cmd + alt - f : yabai -m window --toggle zoom-fullscreen
hyper - 0x18 : yabai -m window --toggle zoom-parent
# uses brackets left: [ right: ]
cmd + alt - 0x21 : yabai -m window --resize left:-20:0
cmd + alt + shift - 0x21 : yabai -m window --resize left:20:0
cmd + alt - 0x1E : yabai -m window --resize right:20:0
cmd + alt + shift - 0x1E : yabai -m window --resize right:-20:0
# uses + and -
cmd + alt - 0x1B : yabai -m window --resize top:0:20
cmd + alt +shift - 0x1B : yabai -m window --resize top:0:-20
cmd + alt - 0x18 : yabai -m window --resize bottom:0:20
cmd + alt + shift - 0x18 : yabai -m window --resize bottom:0:-20
# -- floating windows --
cmd + alt + ctrl - f : yabai -m window --toggle float; \
yabai -m window --grid 4:4:1:1:2:2
# floating window to left half & right half
cmd + alt - left : yabai -m window --grid 1:2:0:0:1:1
cmd + alt - right : yabai -m window --grid 1:2:1:0:1:1
# -- moving to another "space" on the current display --
cmd + alt - 1 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 1; yabai -m window --focus $wid
cmd + alt - 2 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 2; yabai -m window --focus $wid
cmd + alt - 3 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 3; yabai -m window --focus $wid
cmd + alt - 4 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 4; yabai -m window --focus $wid
cmd + alt - 5 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 5; yabai -m window --focus $wid
cmd + alt - 6 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 6; yabai -m window --focus $wid
cmd + alt - 7 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 7; yabai -m window --focus $wid
cmd + alt - 8 : wid=$($DOTFILES/zsh/functions/yabai_window_id.zsh) yabai -m window --space 8; yabai -m window --focus $wid
# -- moving to another to another display --
cmd + ctrl - 1 : yabai -m window --display 1; yabai -m display --focus 1
cmd + ctrl - 2 : yabai -m window --display 2; yabai -m display --focus 2
cmd + ctrl - 3 : yabai -m window --display 3; yabai -m display --focus 3
# -- focus another display --
hyper - 1 : yabai -m display --focus 1
hyper - 2 : yabai -m display --focus 2
hyper - 3 : yabai -m display --focus 3
hyper - b : yabai -m display --focus prev || yabai -m display --focus recent
hyper - n : yabai -m display --focus next || yabai -m display --focus recent
# -- stack windows onto each other
shift + cmd - b : yabai -m window --focus stack.prev || yabai -m window --focus stack.last
shift + cmd - n : yabai -m window --focus stack.next || yabai -m window --focus stack.first
shift + cmd - h : yabai -m window --stack west
shift + cmd - j : yabai -m window --stack south
shift + cmd - k : yabai -m window --stack north
shift + cmd - l : yabai -m window --stack east