|
#!/usr/bin/env zsh
|
|
|
|
sudo yabai --load-sa
|
|
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
|
|
|
|
|
|
## global settings
|
|
# focus window that your mouse hovers on (disabled due to right click bugs)
|
|
#yabai -m config focus_follows_mouse off
|
|
# move mouse to focused window
|
|
yabai -m config mouse_follows_focus off
|
|
yabai -m config window_placement first_child #second_child
|
|
# floating windows always stay on top
|
|
yabai -m config window_topmost on
|
|
# enable borders
|
|
yabai -m config window_border on
|
|
yabai -m config split_ratio 0.50
|
|
# don't automatically rebalance windows
|
|
yabai -m config auto_balance off
|
|
# swap windows if moved with mouse
|
|
yabai -m config mouse_action1 move
|
|
# resize windows if resized with mouse
|
|
yabai -m config mouse_action2 resize
|
|
yabai -m config mouse_drop_action swap
|
|
|
|
#-=-=-=-=-=-=-=-=-=-=-=
|
|
# Padding and Gaps
|
|
yabai -m config layout bsp
|
|
yabai -m config top_padding 3
|
|
yabai -m config bottom_padding 3
|
|
yabai -m config left_padding 3
|
|
yabai -m config right_padding 3
|
|
yabai -m config window_gap 5
|
|
|
|
# Override gaps for space 2 only:
|
|
yabai -m config --space 3 window_gap 2
|
|
#yabai -m config --space 5 window_border_width 0
|
|
|
|
#-=-=-=-=-=-=-=-=-=-=-=
|
|
# SIP Required
|
|
# prevent border from being under the active window
|
|
#yabai -m config active_window_border_topmost on
|
|
yabai -m config window_shadow float
|
|
yabai -m config window_opacity on
|
|
#yabai -m config window_opacity_duration 0.0
|
|
yabai -m config active_window_opacity 0.99
|
|
yabai -m config normal_window_opacity 0.99
|
|
yabai -m config window_border_width 6
|
|
yabai -m config active_window_border_color 0xffad82cb
|
|
yabai -m config normal_window_border_color 0xffaaaaaa
|
|
|
|
#-=-=-=-=-=-=-=-=-
|
|
# Space labels
|
|
yabai -m space 1 --label "Primary"
|
|
yabai -m space 2 --label "Comms"
|
|
# yabai -m space 3 --label "Tools"
|
|
# yabai -m space 4 --label "Media"
|
|
# yabai -m space 5 --label "Social"
|
|
# yabai -m space 6 --label "Float"
|
|
# yabai -m space 7 --label "Secondary"
|
|
#
|
|
# Space config
|
|
yabai -m config --space 9 layout float
|
|
yabai -m config --space 6 layout float
|
|
#
|
|
# # Unmanaged
|
|
# yabai -m rule --add app="^System Preferences$" manage=off border=off
|
|
#
|
|
# Primary
|
|
yabai -m rule --add app="Brave Browser" space=1
|
|
yabai -m rule --add app="Safari" space=1
|
|
# yabai -m rule --add app="kitty" space=1
|
|
# yabai -m rule --add app="Preview" space=1
|
|
# yabai -m rule --add app="VimR" space=1
|
|
# yabai -m rule --add app="Simulator" space=1
|
|
# yabai -m rule --add app="Skim" space=1
|
|
#
|
|
# # Communication
|
|
# yabai -m rule --add app="Slack" space=2
|
|
# yabai -m rule --add app="Notability" space=2
|
|
# yabai -m rule --add app="Microsoft Outlook" space=2
|
|
yabai -m rule --add app="Messages" space=2
|
|
yabai -m rule --add app="ChatMate" space=2
|
|
#
|
|
# # Tools
|
|
# yabai -m rule --add app="Finder" space=7
|
|
# yabai -m rule --add app="Microsoft Word" space=3
|
|
# yabai -m rule --add app="Sequel Pro" space=3
|
|
# yabai -m rule --add app="Postman" space=3
|
|
# yabai -m rule --add app="Sourcetree" space=3
|
|
# yabai -m rule --add app="Activity Monitor" space=3
|
|
# yabai -m rule --add app="App Store" space=3
|
|
# yabai -m rule --add app="WebTorrent" space=3
|
|
# yabai -m rule --add app="Terminal" space=3
|
|
#
|
|
|
|
# =-=-=-=
|
|
# Yabai Space Indicator
|
|
yabai -m signal --add event=mission_control_exit action='echo "refresh" | nc -U /tmp/yabai-indicator.socket'
|
|
yabai -m signal --add event=display_added action='echo "refresh" | nc -U /tmp/yabai-indicator.socket'
|
|
yabai -m signal --add event=display_removed action='echo "refresh" | nc -U /tmp/yabai-indicator.socket'
|
|
yabai -m signal --add event=window_created action='echo "refresh windows" | nc -U /tmp/yabai-indicator.socket'
|
|
yabai -m signal --add event=window_destroyed action='echo "refresh windows" | nc -U /tmp/yabai-indicator.socket'
|
|
yabai -m signal --add event=window_focused action='echo "refresh windows" | nc -U /tmp/yabai-indicator.socket'
|
|
yabai -m signal --add event=window_moved action='echo "refresh windows" | nc -U /tmp/yabai-indicator.socket'
|
|
yabai -m signal --add event=window_resized action='echo "refresh windows" | nc -U /tmp/yabai-indicator.socket'
|
|
yabai -m signal --add event=window_minimized action='echo "refresh windows" | nc -U /tmp/yabai-indicator.socket'
|
|
yabai -m signal --add event=window_deminimized action='echo "refresh windows" | nc -U /tmp/yabai-indicator.socket'
|
|
##=-=-=-=-=-=-=-=-=-
|
|
## Rules:
|
|
yabai -m rule --add label="Calculator" app="^Calculator$" manage=off
|
|
yabai -m rule --add label="Dictionary" app="^Dictionary$" manage=off
|
|
yabai -m rule --add label="Reminders" app="^Reminders$" manage=off
|
|
yabai -m rule --add label="Finder" app="^Finder$" title="(Co(py|nnect)|Move|Info|Pref)" manage=off
|
|
yabai -m rule --add label="Safari" app="^Safari$" title="^(General|(Tab|Password|Website|Extension)s|AutoFill|Se(arch|curity)|Privacy|Advance)$" manage=off
|
|
yabai -m rule --add label="Brave" app="^Brave$" title="^(General|(Tab|Password|Website|Extension)s|AutoFill|Se(arch|curity)|Privacy|Advance)$" manage=off
|
|
yabai -m rule --add label="System Preferences" app="^System Preferences$" title=".*" manage=off
|
|
yabai -m rule --add label="App Store" app="^App Store$" manage=off
|
|
yabai -m rule --add label="Activity Monitor" app="^Activity Monitor$" manage=off
|
|
#=-=-=-=-=-=-=
|
|
#
|
|
echo "Yabai's configuration loaded ... O.K."
|