Yabai

yabai is a tool that replaces i3 on macos, (in combination with sdhk)

yabai config

# Remove disgusting borders around application
yabai -m config layout bsp
yabai -m config top_padding 0
yabai -m config bottom_padding 0
yabai -m config left_padding 0
yabai -m config right_padding 0
yabai -m config window_gap 0
 
# Assign apps to spaces
yabai -m rule --add app="iTerm2" space=1
yabai -m rule --add app="IntelliJ IDEA" space=1
yabai -m rule --add app="Firefox" space=2
yabai -m rule --add app="Chrome" space=3
yabai -m rule --add app="Discord" space=5
yabai -m rule --add app="Spotify" space=5
 
# disable Yabai form resizing applications
yabai -m rule --add app="^System Settings$" sticky=on layer=above manage=off
 

sdhk config

sdhk is a tool that binds shortcuts to commands

# Toggle fullscreen for app
ctrl + lshift - f : yabai -m window --toggle zoom-fullscreen
 
# Move windows around
ctrl + shift - j : yabai -m window --warp south
ctrl + shift - k : yabai -m window --warp north
ctrl + shift - h : yabai -m window --warp west
ctrl + shift - l : yabai -m window --warp east
 
# Move windows around spaces
ctrl + shift - 1 : yabai -m window --space 1
ctrl + shift - 2 : yabai -m window --space 2
ctrl + shift - 3 : yabai -m window --space 3
ctrl + shift - 4 : yabai -m window --space 4
ctrl + shift - 5 : yabai -m window --space 5
ctrl + shift - 6 : yabai -m window --space 6
ctrl + shift - 7 : yabai -m window --space 7
ctrl + shift - 8 : yabai -m window --space 8
 
# Focus windows relative to current focused window
ctrl - j : yabai -m window --focus south
ctrl - k : yabai -m window --focus north
ctrl - h : yabai -m window --focus west
ctrl - l : yabai -m window --focus east