#!/usr/bin/env sh # yabairc configuration by Gbanyan, 2022/12/11 # some options need script addition to enable ## global settings yabai -m config external_bar off yabai -m config mouse_follows_focus off yabai -m config focus_follows_mouse off ## New window spawns to the right if vertical split, or bottom if horizontal split yabai -m config window_placement second_child ## Windows layout and management yabai -m config layout bsp yabai -m config window_topmost on yabai -m config window_animation_duration 0.5 yabai -m config window_shadow off yabai -m config insert_feedback_color 0xffd75f5f yabai -m config auto_balance on yabai -m config split_ratio 0.50 ## Windows_opacity yabai -m config window_opacity off yabai -m config window_opacity_duration 0.4 yabai -m config active_window_opacity 1.0 yabai -m config normal_window_opacity 0.2 ## Windows border yabai -m config window_border off # (on | off) yabai -m config window_border_width 6 yabai -m config window_border_hidpi on yabai -m config active_window_border_color 0xff775759 yabai -m config normal_window_border_color 0xff555555 ## Windows gap yabai -m config top_padding 8 yabai -m config bottom_padding 8 yabai -m config left_padding 8 yabai -m config right_padding 8 yabai -m config window_gap 8 ## set mouse interaction modifier key (default: fn) yabai -m config mouse_modifier fn # set modifier + left-click drag to resize window (default: move) yabai -m config mouse_action1 move # set modifier + right-click drag to resize window (default: resize) yabai -m config mouse_action2 resize yabai -m config mouse_drop_action stack # My custom space names for my 3 monitor setup. These names are used in some of my scripts. yabai -m space 1 --label one yabai -m space 2 --label two yabai -m space 3 --label three yabai -m space 4 --label four yabai -m space 5 --label five yabai -m space 6 --label six yabai -m space 9 --label nine # Windows Exception yabai -m rule --add app="^IINA$" sticky=on layer=above manage=off yabai -m rule --add app="^App Store$" sticky=on layer=above manage=off yabai -m rule --add app="^系統設定$" sticky=on layer=above manage=off yabai -m rule --add app="^System Preferences$" sticky=on layer=above manage=off yabai -m rule --add app="^系統資訊$" sticky=on layer=above manage=off yabai -m rule --add app="^System Information$" sticky=on layer=above manage=off yabai -m rule --add app="^活動監視器$" sticky=on layer=above manage=off yabai -m rule --add app="^Activity Monitor$" sticky=on layer=above manage=off yabai -m rule --add app="^LINE$" sticky=on layer=normal manage=off # yabai -m rule --add app="^Finder$" sticky=on layer=above manage=off yabai -m rule --add app="^計算機$" sticky=on layer=above manage=off yabai -m rule --add app="^Alfred Preferences$" sticky=on layer=above manage=off yabai -m rule --add app="^Disk Utility$" sticky=on layer=above manage=off yabai -m rule --add app="^磁碟工具程式$" sticky=on layer=above manage=off yabai -m rule --add app="^天氣$" manage=off yabai -m rule --add app="^音樂$" manage=off yabai -m rule --add app="^Fate/GO$" manage=off yabai -m rule --add app="^Microsoft Remote Desktop$" manage=off yabai -m rule --add app="^NoMachine$" manage=off ## If I close the active window, focus on any other visible window. yabai -m signal --add event=window_destroyed action="bash ~/.config/yabai/scripts/windowFocusOnDestroy.sh" # yabai -m signal --add event=space_changed action="export CUR_ACTIVE_APP=\"iTerm2\"" echo "yabai configuration loaded.." #END