#!/bin/sh

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

bspc monitor -d 1 2 3 4 5
#bspc monitor -d web dev irc media game 

if [[ $(xrandr -q | grep 'HDMI-0 connected') ]]; then
  bspc monitor HDMI-0 -d 6 7 8
  bspc wm -O DP-0 HDMI-0
fi

bspc config border_width         3
bspc config window_gap          15
#bspc config top_padding 50

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

bspc rule -a Gimp desktop='^5' state=floating follow=on
bspc rule -a Chromium desktop='^2'
bspc rule -a discord desktop='^3' follow=off focus=off 
bspc rule -a mplayer2 state=floating
bspc rule -a Kupfer.py focus=on
bspc rule -a Screenkey manage=off

# cursor fix
xsetroot -cursor_name left_ptr

# picom
/home/sako/.config/picom/startpicom &

# background
feh --bg-scale /home/sako/background.png &

# polybar
/home/sako/.config/polybar/startpolybar &

# applets
nm-applet &
blueman-applet &

# actual software
flameshot &
nextcloud &