#!/bin/sh # Checks if sxhkd is running, if not, run it. # Also use setsid so it's appart from status bar # and the kill doesn't ruin it. pgrep -x sxhkd > /dev/null || setsid sxhkd & # This starts or restarts panel. Be careful # with pkill, if neither of these two programs have # a 'setsid' prepended to their command, sxhdk wil crash. if [ $(pgrep -x panel | wc -l) = 1 ];then pkill -x panel panel & else panel & fi # Multihead stuff. if [ $(uname -n) = "arch" ]; then export MAINMON="DP-0" export SECMON="HDMI-0" # Run a script to select the main monitor. if [ $(pgrep -f bspwm_enforce_monitor_position | wc -l) < 2]; then bspwm_enforce_monitor_position $MAINMON '^1' & else killall bspwm_enforce_monitor_position bspwm_enforce_monitor_position $MAINMON '^1' & fi bspc monitor $MAINMON -d 1 2 3 4 5 bspc monitor $SECMON -d 6 7 8 9 10 else bspc monitor -d I II III IV V VI VII VIII IX X fi # General config. bspc config border_width 5 bspc config window_gap 5 bspc config split_ratio 0.52 bspc config borderless_monocle true bspc config gapless_monocle true # Window rules. # bspc rule -a Gimp desktop='^8' state=floating follow=on # bspc rule -a Chromium desktop='^2' # bspc rule -a mplayer2 state=floating # bspc rule -a Kupfer.py focus=on # bspc rule -a Screenkey manage=off