Skip to content

Instantly share code, notes, and snippets.

@peltho
Created March 16, 2023 15:24
Show Gist options
  • Save peltho/6e6f4d818bee7c8737916116f0767b55 to your computer and use it in GitHub Desktop.
Save peltho/6e6f4d818bee7c8737916116f0767b55 to your computer and use it in GitHub Desktop.
Yabai config file (OSX)
#!/usr/bin/env sh
# *yabai --load-sa* is configured to run through sudo without a password
sudo yabai --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
# bar settings
yabai -m config top_padding 10
# global settings
yabai -m config mouse_follows_focus on
yabai -m config focus_follows_mouse autofocus
yabai -m config window_placement second_child
yabai -m config window_topmost off
yabai -m config window_opacity off
yabai -m config window_opacity_duration 0.0
yabai -m config window_shadow on
yabai -m config active_window_opacity 1.0
yabai -m config normal_window_opacity 0.90
yabai -m config split_ratio 0.50
yabai -m config auto_balance off
# Mouse support
yabai -m config mouse_modifier alt
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
# general space settings
yabai -m config layout bsp
yabai -m config bottom_padding 10
yabai -m config left_padding 10
yabai -m config right_padding 10
yabai -m config window_gap 10
# float system preferences
yabai -m rule --add app='^System Information$' manage=off
yabai -m rule --add app='^System Preferences$' manage=off
yabai -m rule --add title='Preferences$' manage=off
# float settings windows
yabai -m rule --add title='Settings$' manage=off
# mission-control desktop labels
yabai -m space 1 --label messages
yabai -m space 2 --label notes
yabai -m space 3 --label web
yabai -m space 4 --label code
yabai -m space 5 --label zoom
yabai -m space 6 --label media
# window rules
yabai -m rule --add app="^Mailspring$" space=messages
yabai -m rule --add app="^Slack$" space=messages
yabai -m rule --add app="^Google\ Chrome$" space=web
yabai -m rule --add app="^Notion$" space=notes
yabai -m rule --add app="^Code$" space=code
yabai -m rule --add app="^Spotify$" space=media
yabai -m rule --add app="^zoom\.us$" space=zoom
# specific space settings
yabai -m config --space zoom layout float
@peltho
Copy link
Author

peltho commented Mar 16, 2023

To combine with .skhdrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment