bspwm: Fix assignment gap in assignment script

This commit is contained in:
Salt 2018-02-12 19:43:38 -06:00
parent 722b56f225
commit 67483138e7

View File

@ -27,18 +27,17 @@ fi
## bspwm GENERAL CONFIGURATION ## bspwm GENERAL CONFIGURATION
monitors=$(bspc query -M | wc -l) monitors=$(bspc query -M | wc -l)
desktops=8 desktops=9
deskpermon=$(expr $desktops / $monitors) deskpermon=$(expr $desktops / $monitors)
i = 1 i=1
for monitor in $(bspc query -M); do for monitor in $(bspc query -M); do
layout="$layout $i"
i=$(expr $i + 1)
until [[ "$(expr $i % $deskpermon)" == *"0"* ]]; do until [[ "$(expr $i % $deskpermon)" == *"0"* ]]; do
layout="$layout $i" layout="$layout $i"
i=$(expr $i + 1) i=$(expr $i + 1)
done done
bspc monitor $monitor -d $layout bspc monitor $monitor -d $layout
layout="" layout="$i"
i=$(expr $i + 1)
done done
unset layout unset layout
unset monitors unset monitors