22 lines
461 B
Bash
Executable File
22 lines
461 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 [ "$(exists "HDMI-1")" -gt 1 ] && [ "$(hostname)" = "mainsail" ]; then
|
|
printf "mainsail selected\nHDMI-1 detected only, doing that\n"
|
|
bspc monitor HDMI-1 -d 1 2 3 4 5 6 7 8 9
|
|
fi
|