#! /bin/sh

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

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

bspc config border_width 4
bspc config border_radius 14
bspc config window_gap 7
bspc config top_padding 44

bspc config split_ratio 0.54
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
bspc rule -a Emacs state=floating center=true rectangle=1900x1111+0+0
bspc rule -a DBeaver state=floating center=true rectangle=2123x1234+0+0

# 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

# Wallpapers
# feh --bg-scale ~/.wallpapers/MYSanGun-Inverted.png ~/.wallpapers/MYSanGun.png
variety &

copyq &

# Notifications
dunst -conf ~/.config/dunst/dunstrc &

# 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 &

# emacs --bg-daemon

SVPManager \t &

# screensaver
if pgrep xscreensaver; then
	killall xscreensaver
fi
xscreensaver --no-splash &

# Bar
~/SudacodeRice/scripts/launch_desktop.sh

# start yubikey ssh-agen
yubikey-agent -l "$XDG_RUNTIME_DIR/yubikey-agent/yubikey-agent.sock" &

# Cursor
# xsetroot -cursor_name left_ptr &

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