#!/usr/bin/env sh
# yabai configuration file
# https://github.com/koekeishiya/yabai

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

yabai -m config \
  auto_balance on \
  layout bsp \
  top_padding 0 \
  bottom_padding 0 \
  left_padding 0 \
  right_padding 0 \
  window_gap 2 \
  normal_window_opacity 0.60 \
  window_placement second_child \
  window_opacity on \
  window_shadow float

# apps to not manage (ignore)
# TODO: add apps from aerospace config to here
# list active apps:
# > yabai -m query --windows | jq .[].app | sort | uniq
yabai -m rule --add app="1Password" manage=off
yabai -m rule --add app="Fork" manage=off
yabai -m rule --add app="GoLand" manage=off
yabai -m rule --add app="JetBrains Rider" manage=off
yabai -m rule --add app="Logi Options" manage=off
yabai -m rule --add app="MSTeams" manage=off
yabai -m rule --add app="Microsoft Teams" manage=off
yabai -m rule --add app="PhpStorm" manage=off
yabai -m rule --add app="Slack" manage=off
yabai -m rule --add app="System Settings" manage=off
yabai -m rule --add app="TIDAL" manage=off
yabai -m rule --add app="Windows App" manage=off
yabai -m rule --add app="Zoom" manage=off

# apply rules
yabai -m rule --apply
