# Init scripting addition
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
sudo yabai --load-sa

# Borders and padding
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                   3
# yabai -m window_shadow on# yabai -m active_window_opacity 1.0
# yabai -m normal_window_opacity 0.90# Padding

# mouse settings
yabai -m config focus_follows_mouse autofocus
yabai -m config mouse_follows_focus on
yabai -m config mouse_modifier alt
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
yabai -m config mouse_drop_action swap

# Disable specific apps

#Applications
# Web browsers
yabai -m rule --add app="^Google Chrome|Firefox$" space=1
# Text editors
yabai -m rule --add app="^(Code|RStudio)$" space=2
# Jetbrains apps
apps="^(IntelliJ IDEA|WebStorm|RubyMine|PyCharm|DataGrip)$"
yabai -m rule --add app="${apps}" space=3  manage=off
# Terminal
yabai -m rule --add app="^(Alacritty|Warp)$" space=4
# Music
yabai -m rule --add app="^(Spotify|Amazon Music)$" space=5
# Social
yabai -m rule --add app="^(Slack|WhatsApp|Microsoft Teams)$" space=6

yabai -m rule --add app="^System Settings$" manage=off
yabai -m rule --add app="^Calculator$" manage=off
yabai -m rule --add app="^Karabiner-Element$" manage=off
yabai -m rule --add app="^App Store$" manage=off
yabai -m rule --add app="^Calendar$" manage=off
yabai -m rule --add app="^Finder$" manage=off
yabai -m rule --add app="^DBeaver$" manage=off
yabai -m rule --add app="^Discord$" manage=off
