create desktops automatically

nixos
Moritz Böhme 2021-09-30 19:42:27 +02:00
parent 79fa032a15
commit 86b142670e
1 changed files with 9 additions and 6 deletions

View File

@ -1,12 +1,15 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# MONITORS # # MONITORS #
if [[ "$(uname -n)" == *'desktop'* ]]; then monitors=($(bspc query -M --names))
bspc monitor HDMI-0 -d 1 2 3 4 5 desktops=$(expr 10 / ${#monitors[@]})
bspc monitor HDMI-1 -d 6 7 8 9 10 start=1
else end=$desktops
bspc monitor -d 1 2 3 4 5 6 7 8 9 for monitor in ${monitors[@]}; do
fi bspc monitor $monitor -d $(seq -s ' ' $start $end)
start=$(expr $start + $desktops)
end=$(expr $end + $desktops)
done
# CONFIGURATION # # CONFIGURATION #