dot_testing/builds/utils/sh/disp
2023-11-21 11:10:48 -06:00

25 lines
512 B
Bash
Executable File

#!/bin/sh
exists() {
xrandr | grep ' connected' | grep -c "${1}"
}
if [ ! "$(hostname)" = "mainsail" ]; then
bspc monitor eDP-1 -d 1 2 3 4 5 6 7 8 9
fi
if [ "$(exists "DP-1")" -gt 1 ]; then
printf "two"
bspc monitor DP-1 -s eDP-1
xrandr --output eDP-1 --off
exit 0
fi
if [ "$(hostname)" = "mainsail" ]; then
# this is a tower, so there's only one configuration
printf "mainsail detected\n"
xrandr --output VGA-1 --left-of HDMI-1
bspc monitor VGA-1 -d 1 3 5 7 9
bspc monitor HDMI-1 -d 2 4 6 8 0
fi