Guest

new-yabai-config

Sep 4th, 2026
27
0
Never
Not a member of GistPad yet? Sign Up, it unlocks many cool features!
None 4.98 KB | None | 0 0
  1. #!/usr/bin/env sh
  2. # ~/.config/yabai/yabairc -- mirrors ~/.config/hypr/hyprland.lua
  3. # chmod +x this file. Requires: yabai, skhd, borders (JankyBorders).
  4.  
  5. # No scripting addition: everything here works with SIP fully enabled.
  6.  
  7. # ---- Layout (dwindle -> bsp) ----
  8. yabai -m config layout bsp
  9. yabai -m config window_placement second_child # dwindle: new window goes right/below
  10. yabai -m config auto_balance off
  11. yabai -m config split_ratio 0.50
  12. yabai -m config split_type auto # dwindle picks split by aspect ratio
  13.  
  14. # ---- Gaps (gaps_in=4 per side -> 8 between windows, gaps_out=10) ----
  15. yabai -m config window_gap 8
  16. yabai -m config top_padding 10
  17. yabai -m config bottom_padding 10
  18. yabai -m config left_padding 10
  19. yabai -m config right_padding 10
  20.  
  21. # ---- Decoration ----
  22. yabai -m config window_shadow on # shadow.enabled = true
  23. yabai -m config insert_feedback_color 0xffa855f7
  24. # Window animations need the scripting addition (SIP off); intentionally omitted.
  25.  
  26. # ---- Borders (JankyBorders) ----
  27. # Hyprland: border_size=4, active #a855f7 -> #7c3aed gradient, inactive #28222f, rounding=10.
  28. # Calling borders while it is already running just pushes these options to it.
  29. borders active_color="gradient(top_left=0xffa855f7,bottom_right=0xff7c3aed)" \
  30. inactive_color=0xff28222f \
  31. width=4.0 \
  32. style=round &
  33.  
  34. # ---- Input (follow_mouse = 2: click to focus, no focus-follows-mouse) ----
  35. yabai -m config focus_follows_mouse off
  36. yabai -m config mouse_follows_focus off
  37.  
  38. # ---- Mouse (SUPER+LMB drag = move, SUPER+RMB drag = resize) ----
  39. yabai -m config mouse_modifier cmd
  40. yabai -m config mouse_action1 move
  41. yabai -m config mouse_action2 resize
  42. yabai -m config mouse_drop_action swap
  43.  
  44. # ---- Window rules ----
  45. # System dialogs and utilities that should float:
  46. yabai -m rule --add app="^System Settings$" manage=off
  47. yabai -m rule --add app="^Finder$" manage=off
  48. yabai -m rule --add app="^Archive Utility$" manage=off
  49. yabai -m rule --add app="^Calculator$" manage=off
  50. yabai -m rule --add app="^Activity Monitor$" manage=off
  51. yabai -m rule --add app="^Karabiner-Elements$" manage=off
  52. yabai -m rule --add title="^(Open|Save|Print)" manage=off
  53.  
  54. echo "yabai configuration loaded.."
RAW Paste Data Copied