#! /bin/sh

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

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

bspc config border_width 6
bspc config window_gap 15
bspc config top_padding 40

bspc config split_ratio 0.55
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config pointer_follows_focus true
bspc config focus_follows_pointer true

bspc rule -a Gimp desktop='^8' state=floating follow=on
bspc rule -a Chromium desktop='^5'
bspc rule -a firefox desktop='^5'
bspc rule -a mplayer2 state=floating
bspc rule -a Yad state=floating
bspc rule -a Kupfer.py focus=on
bspc rule -a Screenkey manage=off
bspc rule -a gl state=floating
bspc rule -a Gl state=floating
bspc rule -a mpv state=floating

# Border
# dracula blue
# bspc config focused_border_color "#bd93f9"
bspc config focused_border_color "#2C4762"
bspc config normal_border_color "#073642"
bspc config active_border_color "#073642"

#
# Autostart
#
# Set display from arandr saved script
sh ~/.screenlayout/monitor.sh &
# Notifications
/usr/bin/dunst &
# Polkit
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
# Dex
dex -a -s /etc/xdg/autostart/:~/.config/autostart/
# Picom
picom --config ~/.config/picom/picom.conf &
# Network Applet
nm-applet --indicator &

# lxsession
if ! pgrep -qaf lxsession; then
	lxsession -s bspwm -e BSPWM &
fi

# SmoothVideoProject
SVPManager &

# screensaver
xss-lock -- xscreensaver-command -lock &

# Bar
# ~/.config/polybar/launch.sh &
~/SudacodeRice/scripts/launch_desktop.sh

# Cursor
# xsetroot -cursor_name left_ptr &

# Low battery notifier
# ~/.config/bspwm/scripts/low_bat_notifier.sh
