#!/usr/bin/env bash
killall bspc

##################################################
# AUTOSTART
##################################################
killall sxhkd
killall picom
sxhkd &
picom &
killall nm-applet && nm-applet &
killall volumeicon && volumeicon &
#killall conky
#sleep 3 && conky -c ~/.config/conky/conkyrc
~/scripts/random_wallpaper.sh

wmname LG3D
export _JAVA_AWT_WM_NONREPARETING=1

bspc monitor -d 1 2 3 4 5

bspc config border_width        2
bspc config window_gap          10
bspc config top_padding         20
bspc config border_radius       2
bspc config focus_follows_pointer       true
#bspc config click_to_focus				true
bspc config gapless_monocle             true
#bspc config pointer_follows_focus       true
#bspc config single_monocle              true
bspc config top_monocle_padding          20
bspc config left_monocle_padding         20 
bspc config right_monocle_padding        20 
bspc config bottom_monocle_padding       20 
#bspc config ignore_ewmh_fullscreen       enter

# Colors
bspc config focused_border_color            "$color9"
bspc config active_border_color             "$color9"
bspc config normal_border_color             "$color1"
bspc config urgent_border_color             "$color1"
bspc config presel_feedback_color           "$color1"
bspc config focused_locked_border_color     "$color1"
bspc config active_locked_border_color      "$color1"
bspc config normal_locked_border_color      "$color1"
bspc config focused_sticky_border_color     "$color1"
bspc config active_sticky_border_color      "$color1"
bspc config normal_sticky_border_color      "$color1"
bspc config focused_private_border_color    "$color1"
bspc config active_private_border_color     "$color1"
bspc config normal_private_border_color     "$color1"

bspc rule -a \* state=tiled
# Load session
# shellcheck source=/dev/null
#. "$BSPWM_CONFIG/restore.cfg"
#if [ -e "$BSPWM_STATE" ] ; then
#	bspc wm --load-state "$BSPWM_STATE"
#	bspc wm --adopt-orphans
#	rm "$BSPWM_STATE"
#fi

# TODO heres polybar
polybar panel-bspwm
