#!/usr/bin/env sh

#
# Bar
#

yabai -m config status_bar                   on
yabai -m config status_bar_text_font         ".AppleSystemUIFont:Regular:12.0"
yabai -m config status_bar_icon_font         "Font Awesome 5 Pro:Solid:12.0"
yabai -m config status_bar_background_color  0xdf202020
yabai -m config status_bar_foreground_color  0xff999999
yabai -m config status_bar_space_icon_strip       
yabai -m config status_bar_power_icon_strip   
yabai -m config status_bar_space_icon        
yabai -m config status_bar_clock_icon        

#
# Cursor
#

yabai -m config mouse_follows_focus          on
yabai -m config focus_follows_mouse          off # autofocus

#
# Styling
#

yabai -m config window_border                on
yabai -m config window_border_width          2

yabai -m config active_window_border_color   0xbbcb4b16
yabai -m config normal_window_border_color   0x00cb4b16
yabai -m config insert_window_border_color   0xff268bd2

yabai -m config window_opacity               off
yabai -m config active_window_opacity        1.0
yabai -m config normal_window_opacity        0.90
yabai -m config window_opacity_duration      0.0

yabai -m config window_shadow                on

#
# Desktop
#

yabai -m config window_placement             second_child
yabai -m config window_topmost               on
yabai -m config split_ratio                  0.50
yabai -m config auto_balance                 off
yabai -m config mouse_modifier               alt
yabai -m config mouse_action1                move
yabai -m config mouse_action2                resize

yabai -m config layout                       bsp
yabai -m config top_padding                  20
yabai -m config bottom_padding               20
yabai -m config left_padding                 20
yabai -m config right_padding                20
yabai -m config window_gap                   12

#
# App rules
#
yabai -m rule --add app=Spotify space=1 display=2
yabai -m rule --add app=Mail space=2
yabai -m rule --add app=Safari space=3
yabai -m rule --add app=Chrome space=3
yabai -m rule --add app=Firefox space=3
yabai -m rule --add app=Brave space=3
yabai -m rule --add app=iTerm space=4
yabai -m rule --add app=kitty space=4
yabai -m rule --add app=Discord space=5
yabai -m rule --add app=Telegram space=5
yabai -m rule --add app=Slack space=5
yabai -m rule --add app=Signal space=5
yabai -m rule --add app=Skype space=5
yabai -m rule --add app=Preview title=.pdf space=6
yabai -m rule --add app=Steam space=7
#
# Space rules
#
yabai -m space 7 --layout float

echo "yabai configuration loaded.."
