fix issues with new bspwm monitor detection stuff

This commit is contained in:
Daniel Flanagan 2016-11-23 12:05:51 -06:00
parent f6c4b2c4d4
commit 6a243c8d06
2 changed files with 10 additions and 6 deletions

12
env/wm/bspwm_config vendored
View File

@ -20,7 +20,10 @@ bspc config gapless_monocle true
bspc config window_gap "$WINDOW_GAP"
MONITOR_COUNT=$(bspc query -M | wc -l | awk '{ printf $1 }')
echo "${BSPWM_MONITORS}"
BSPWM_MONITORS=$(bspc query -M | tac)
MONITOR_COUNT=$(echo "${BSPWM_MONITORS}" | wc -w | awk '{ printf $1 }')
PER_MONITOR=$((10 / MONITOR_COUNT))
i=1
for mon in ${BSPWM_MONITORS}; do
@ -28,7 +31,12 @@ for mon in ${BSPWM_MONITORS}; do
echo $i
max=$((i + PER_MONITOR - 1))
echo $max
bspc monitor "$mon" -d $(seq $i $max)
screens=
ind="•"
for j in $(seq $i $max); do
screens="$screens$ind "
done
bspc monitor "$mon" -d $screens
i=$((max + 1))
done

4
env/x/xinitrc vendored
View File

@ -24,16 +24,12 @@ if [ -d "/usr/lib/nvidia" ]; then
export LD_LIBRARY_PATH=/usr/lib/nvidia
fi
export BSPWM_MONITORS=$(bspc query -M)
if [ -f "$HOME/.xinitrc.env" ]; then
source "$HOME/.xinitrc.env"
fi
# fire up wm
unclutter &
sxhkd &
urxvtd &
exec bspwm