#! /bin/sh

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

#compton --backend glx --vsync opengl-swc &
compton &
nitrogen --restore &
polybar &

bspc monitor -d I II III IV V VI VII VIII IX X

bspc config border_width         2
bspc config window_gap           3

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

bspc config focus_follows_pointer   true

bspc config automatic_scheme     longest_side
bspc config single_monocle       true

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

# Floating Apps
declare -a floatingApps=(xdman-Main Lxappearance Nextcloud Gparted Thunar \ 
Viewnior Xarchiver Pavucontrol firefox:Dialog \
firefox:Pop-up nitrogen Gpick)
for i in ${floatingApps[@]}; do
    bspc rule -a $i state=floating focus=on follow=on; done

declare -a floatingCust=(*:*:Picture-in-picture *:Toolkit:Picture-in-Picture mpv)
for i in ${floatingCust[@]}; do
	bspc rule -a $i state=floating sticky=on follow=off focus=on \
    rectangle=500x300+1366+50; done
