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/.local/bin/monis

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