26 lines
716 B
Bash
Executable File
26 lines
716 B
Bash
Executable File
#!/bin/sh
|
|
|
|
M=$(bspc query -M --names)
|
|
NUM=$(echo "$M" | awk 'END{print NR}')
|
|
|
|
ettin() {
|
|
sec=$(echo "$M" | awk NR==2)
|
|
xrandr --output LVDS1 --primary --auto --scale 1.0x1.0 --output "$sec" --right-of LVDS1 --auto --scale 1.0x1.0
|
|
setbg
|
|
bspc monitor LVDS1 -d 1 2 3 4 5
|
|
bspc monitor "$sec" -d 6 7 8 9 10
|
|
bspc rule -a Firefox:Navigator state=tiled, desktop='^6'
|
|
}
|
|
|
|
cyclops() {
|
|
xrandr --output LVDS1 --primary --auto --scale 1.0x1.0 "$(echo "$M" | awk '! /LVDS1/ {print "--output", $1, "--off"}' | paste -sd ' ')"
|
|
bspc monitor -d 1 2 3 4 5 6 7 8 9 10
|
|
bspc rule -a Firefox:Navigator state=tiled, desktop='^2'
|
|
}
|
|
|
|
if [ "$NUM" = 1 ]; then
|
|
cyclops
|
|
elif [ "$NUM" = 2 ]; then
|
|
ettin
|
|
fi
|