Skip to content

Instantly share code, notes, and snippets.

@Thomasorus
Created June 11, 2021 11:23
Show Gist options
  • Save Thomasorus/031aab37a8405739a24e19739588c5a7 to your computer and use it in GitHub Desktop.
Save Thomasorus/031aab37a8405739a24e19739588c5a7 to your computer and use it in GitHub Desktop.
# opens iTerm2
ctrl + alt - return : open -na iTerm
# Open home folder in finder
ctrl + alt - n : open $HOME
# Show system statistics
fn + lalt - 1 : "${HOME}"/.config/yabai/scripts/show_cpu.sh
fn + lalt - 2 : "${HOME}"/.config/yabai/scripts/show_mem.sh
fn + lalt - 3 : "${HOME}"/.config/yabai/scripts/show_bat.sh
fn + lalt - 4 : "${HOME}"/.config/yabai/scripts/show_disk.sh
fn + lalt - 5 : "${HOME}"/.config/yabai/scripts/show_song.sh
# Navigation
alt - left : yabai -m window --focus west
alt - down : yabai -m window --focus south
alt - up : yabai -m window --focus north
alt - right : yabai -m window --focus east
# Moving windows
shift + alt - left : yabai -m window --warp west
shift + alt - down : yabai -m window --warp south
shift + alt - up : yabai -m window --warp north
shift + alt - right : yabai -m window --warp east
# Moving to workspace
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
alt - 6 : yabai -m space --focus 6
alt - 7 : yabai -m space --focus 7
alt - 8 : yabai -m space --focus 8
alt - 9 : yabai -m space --focus 9
alt - 0 : yabai -m space --focus 10
# Move focus container to workspace
shift + alt - 1 : yabai -m window --space 1
shift + alt - 2 : yabai -m window --space 2
shift + alt - 3 : yabai -m window --space 3
shift + alt - 4 : yabai -m window --space 4
shift + alt - 5 : yabai -m window --space 5
shift + alt - 6 : yabai -m window --space 6
shift + alt - 7 : yabai -m window --space 7
shift + alt - 8 : yabai -m window --space 8
shift + alt - 9 : yabai -m window --space 9
shift + alt - 0 : yabai -m window --space 10
# Resize windows
lctrl + alt - left : yabai -m window --resize left:-50:0; \
yabai -m window --resize right:-50:0
lctrl + alt - down : yabai -m window --resize bottom:0:50; \
yabai -m window --resize top:0:50
lctrl + alt - up : yabai -m window --resize top:0:-50; \
yabai -m window --resize bottom:0:-50
lctrl + alt - right : 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
# Rotate windows clockwise and anticlockwise
alt - r : yabai -m space --rotate 270
shift + alt - r : yabai -m space --rotate 90
# Rotate on X and Y Axis
shift + alt - x : yabai -m space --mirror x-axis
shift + alt - y : yabai -m space --mirror y-axis
# Float / Unfloat window
shift + alt - space : \
yabai -m window --toggle float; \
yabai -m window --toggle border
# Restart Yabai
shift + lctrl + alt - r : \
/usr/bin/env osascript <<< \
"display notification \"Restarting Yabai\" with title \"Yabai\""; \
launchctl kickstart -k "gui/${UID}/homebrew.mxcl.yabai"
# Make window native fullscreen
alt - f : yabai -m window --toggle zoom-fullscreen
shift + alt - f : yabai -m window --toggle native-fullscreen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment