#! /bin/sh

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

# Polkit
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &

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

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
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='^2'
bspc rule -a firefox desktop='^2'
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


# Border
bspc config focused_border_color        "#6c71c4"
bspc config normal_border_color         "#073642"
bspc config active_border_color         "#073642"

#
# Autostart
#
# Set display from arandr saved script
sh ~/.screenlayout/monitor.sh &
# Bar
~/.config/polybar/launch.sh &
# Notifications
/usr/bin/dunst &

# Wallpaper
nitrogen --restore &
# Dex
dex -a -s /etc/xdg/autostart/:~/.config/autostart/  &
# Picom
# picom -b &
# Network Applet
nm-applet --indicator &

# Cursor
xsetroot -cursor_name left_ptr &

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

