bsdconf/xrandr/extend-right.sh
2024-09-15 07:36:08 +03:00

16 lines
391 B
Bash
Executable file

#!/usr/bin/env bash
source config.sh
secondary=$(./vga-or-hdmi.sh)
if [ $? -ne 0 ]; then
>&2 echo "no VGA or HDMI output is present!"
exit 1
fi
secondary_res=$(./max-res.sh "$secondary")
if [ -z "$secondary_res" ]; then
>&2 echo "max res for secondary $secondary not found!"
exit 1
fi
xrandr --output $primary --output $secondary --mode $secondary_res --right-of $primary