dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/bin/multipantalla

34 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euf -o pipefail
I=1
M=$(bspc query -M | wc -l)
if [[ "$M" == 1 ]]; then
bspc monitor -d 1 2 3 4 5 6 7 8 9 10
elif [[ "$M" == 2 ]]; then
bspc monitor "$(bspc query -M | awk NR==1)" -d 1 2 3 4 5
bspc monitor "$(bspc query -M | awk NR==2)" -d 6 7 8 9 10
elif [[ "$M" == 3 ]]; then
bspc monitor "$(bspc query -M | awk NR==1)" -d 1 2 3 4
bspc monitor "$(bspc query -M | awk NR==2)" -d 5 6 7
bspc monitor "$(bspc query -M | awk NR==3)" -d 8 9 10
elif [[ "$M" == 4 ]]; then
bspc monitor "$(bspc query -M | awk NR==1)" -d 1 2 3
bspc monitor "$(bspc query -M | awk NR==2)" -d 4 5 6
bspc monitor "$(bspc query -M | awk NR==3)" -d 7 8
bspc monitor "$(bspc query -M | awk NR==4)" -d 9 10
elif [[ "$M" == 5 ]]; then
bspc monitor "$(bspc query -M | awk NR==1)" -d 1 2
bspc monitor "$(bspc query -M | awk NR==2)" -d 3 4
bspc monitor "$(bspc query -M | awk NR==3)" -d 5 6
bspc monitor "$(bspc query -M | awk NR==4)" -d 7 8
bspc monitor "$(bspc query -M | awk NR==5)" -d 9 10
else
for monitor in $(bspc query -M); do
bspc monitor "$monitor" \
-n "$I" \
-d $I/{a,b,c}
(( I++ ))
done
fi