2017-02-07 16:16:45 -06:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-04-27 15:49:57 -05:00
|
|
|
BORDER_WIDTH=5 # change in bspwmrc
|
2017-02-22 19:01:27 -06:00
|
|
|
export WINDOW_GAP=25
|
2017-04-14 11:52:18 -05:00
|
|
|
DESKTOPS=(dev web gfx env play out misc chat mon util)
|
2017-02-07 16:16:45 -06:00
|
|
|
|
|
|
|
BSPWM_MONITORS=$(bspc query -M | tac)
|
|
|
|
MONITOR_COUNT=$(echo "${BSPWM_MONITORS}" | wc -w | awk '{ printf $1 }')
|
|
|
|
NUM_DESKTOPS=${#DESKTOPS[@]}
|
|
|
|
PER_MONITOR=$((NUM_DESKTOPS / MONITOR_COUNT))
|
|
|
|
|
|
|
|
# allow a per-device config to override options
|
|
|
|
if [ -f "$HOME/.env_bspwm" ]; then
|
|
|
|
source "$HOME/.env_bspwm"
|
|
|
|
fi
|
|
|
|
|
2017-04-27 15:49:57 -05:00
|
|
|
bspc config normal_border_color "$(xrdb -query | sed -ne 's/.*background:\s*//p')"
|
|
|
|
bspc config focused_border_color "$(xrdb -query | sed -ne 's/.*color0\?4:\s*//p')"
|
|
|
|
bspc config active_border_color "$(xrdb -query | sed -ne 's/.*color0\?4:\s*//p')"
|
|
|
|
bspc config presel_feedback_color "$(xrdb -query | sed -ne 's/.*color0\?4:\s*//p')"
|
2017-02-07 16:16:45 -06:00
|
|
|
bspc config border_width "$BORDER_WIDTH"
|
2018-02-09 12:15:44 -06:00
|
|
|
bspc config split_ratio 0.3333333
|
2017-02-07 16:16:45 -06:00
|
|
|
bspc config borderless_monocle true
|
|
|
|
bspc config gapless_monocle true
|
2017-07-27 14:07:18 -05:00
|
|
|
bspc config pointer_modifier "mod4"
|
2017-02-07 16:16:45 -06:00
|
|
|
|
|
|
|
bspc config window_gap "$WINDOW_GAP"
|
|
|
|
|
2018-02-09 12:15:44 -06:00
|
|
|
bspc rule -a "*" split_dir=right
|
|
|
|
|
2017-02-07 16:16:45 -06:00
|
|
|
i=1
|
|
|
|
for mon in ${BSPWM_MONITORS}; do
|
|
|
|
max=$((i + PER_MONITOR - 1))
|
|
|
|
screens=
|
|
|
|
for j in $(seq $i $max); do
|
|
|
|
ind=${DESKTOPS[$((j - 1))]}
|
2017-04-14 07:49:01 -05:00
|
|
|
screens="${screens}${ind} "
|
2017-02-07 16:16:45 -06:00
|
|
|
done
|
|
|
|
bspc monitor "$mon" -d $screens
|
|
|
|
i=$((max + 1))
|
|
|
|
done
|
|
|
|
|
|
|
|
# allow a per-device config to override options
|
|
|
|
if [ -f "$HOME/.env_bspwm_after" ]; then
|
|
|
|
source "$HOME/.env_bspwm_after"
|
|
|
|
fi
|