From 6a243c8d064175b41a64c6c8817ded80b64776bf Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 23 Nov 2016 12:05:51 -0600 Subject: [PATCH] fix issues with new bspwm monitor detection stuff --- env/wm/bspwm_config | 12 ++++++++++-- env/x/xinitrc | 4 ---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/env/wm/bspwm_config b/env/wm/bspwm_config index c4671ea..f7ccbcf 100755 --- a/env/wm/bspwm_config +++ b/env/wm/bspwm_config @@ -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 diff --git a/env/x/xinitrc b/env/x/xinitrc index 12d2be9..0ffe731 100644 --- a/env/x/xinitrc +++ b/env/x/xinitrc @@ -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