#! /bin/sh

# This shouldn't go here, but it technically doesn't matter when it's ran, so...
xrandr --output HDMI-A-0 --set TearFree on
xrandr --output DisplayPort-2 --set TearFree on

# Run screenlayout
#~/screenlayout/second_display.sh

# Get cursor theme
xsetroot -cursor_name left_ptr
xrdb ~/.config/.Xresources

nitrogen --restore

pkill polybar
polybar &

pgrep -x sxhkd > /dev/null || sxhkd &

bspc monitor -d I II III IV V VI VII VIII IX X
#bspc monitor DisplayPort-2 -d DI DII

bspc config border_width         2
bspc config window_gap          12

bspc config split_ratio          0.52
bspc config borderless_monocle   true
bspc config gapless_monocle      true

picom
dunst &

bspc config normal_border_color \#AC3232
bspc config focused_border_color \#07D2A4

#bspc rule -a Gimp desktop='^8' state=floating follow=on
#bspc rule -a Chromium desktop='^2'
#bspc rule -a mplayer2 state=floating
#bspc rule -a Kupfer.py focus=on
#bspc rule -a Screenkey manage=off

# Firefox Picture-in-Picture
bspc rule -a '*:*:Picture-in-Picture' state=floating 
bspc rule -a qjackctl state=floating
bspc rule -a 'JACK Audio Connection Kit [(default)] Active.' state=floating

# Conky
bspc rule -a conky state=floating border=off sticky=on