Skip to content

Instantly share code, notes, and snippets.

@elhenro
Created June 15, 2022 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elhenro/b9d1a89c681d0ab5f8f4eb7c4c76181e to your computer and use it in GitHub Desktop.
Save elhenro/b9d1a89c681d0ab5f8f4eb7c4c76181e to your computer and use it in GitHub Desktop.
simple i3 like skhdrc for yabai
# switch workspaces
alt - 1 : yabai -m space --focus 1
alt - 2 : yabai -m space --focus 2
alt - 3 : yabai -m space --focus 3
alt - 4 : yabai -m space --focus 4
alt - 5 : yabai -m space --focus 5
# toggle window float to ignore tiling
alt - f : yabai -m window --toggle float
# open terminal
alt - return : "${HOME}"/tools/open_iterm2.sh
# open vim
alt - e : "${HOME}"/tools/open_vim.sh
# open xcode
alt - x : "${HOME}"/tools/open_xcode.sh
# change layout
alt - t : yabai -m space --layout bsp
alt - s : yabai -m space --layout stack
shift + alt - f : yabai -m space --layout float
# push in stack
shift + alt - n : yabai -m window --stack next
# focus the next stacked window if possible; otherwise focus the next window or go back to the first window
alt - n : yabai -m window --focus stack.next || yabai -m window --focus next || yabai -m window --focus first
alt - o : yabai -m window --focus stack.prev || yabai -m window --focus prev || yabai -m window --focus last
# Navigation
alt - h : yabai -m window --focus west
alt - j : yabai -m window --focus south
alt - k : yabai -m window --focus north
alt - l : yabai -m window --focus east
# close window
alt - q : yabai -m window --close
# Moving windows
shift + alt - h : yabai -m window --warp west
shift + alt - j : yabai -m window --warp south
shift + alt - k : yabai -m window --warp north
shift + alt - l : yabai -m window --warp east
# Move focus container to workspace
shift + alt - m : yabai -m window --space last; yabai -m space --focus last
shift + alt - p : yabai -m window --space prev; yabai -m space --focus prev
shift + alt - n : yabai -m window --space next; yabai -m space --focus next
shift + alt - 1 : yabai -m window --space 1; yabai -m space --focus 1
shift + alt - 2 : yabai -m window --space 2; yabai -m space --focus 2
shift + alt - 3 : yabai -m window --space 3; yabai -m space --focus 3
shift + alt - 4 : yabai -m window --space 4; yabai -m space --focus 4
shift + alt - 5 : yabai -m window --space 4; yabai -m space --focus 5
alt - v : yabai -m window --insert south
alt - g : yabai -m window --insert east
# Resize windows
lctrl + alt - h : yabai -m window --resize left:-50:0; \
yabai -m window --resize right:-50:0
lctrl + alt - j : yabai -m window --resize bottom:0:50; \
yabai -m window --resize top:0:50
lctrl + alt - k : yabai -m window --resize top:0:-50; \
yabai -m window --resize bottom:0:-50
lctrl + alt - l : yabai -m window --resize right:50:0; \
yabai -m window --resize left:50:0
# Equalize size of windows
lctrl + alt - e : yabai -m space --balance
# Enable / Disable gaps in current workspace
lctrl + alt - g : yabai -m space --toggle padding; yabai -m space --toggle gap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment