From 30e4508fc8b0270018e56702d64aa79ea5122232 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Markus=20Gr=C3=BCneis?= Date: Sat, 12 Oct 2013 10:43:31 +0000 Subject: [PATCH] add old beamer xrandr util from wiki --- xrandr-beamer.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 xrandr-beamer.sh diff --git a/xrandr-beamer.sh b/xrandr-beamer.sh new file mode 100644 index 0000000..90aba76 --- /dev/null +++ b/xrandr-beamer.sh @@ -0,0 +1,27 @@ +#!/bin/bash +LVDSOUTPUT="$(xrandr | grep ' connected ' | cut -f1 -d' ' | grep LVDS)" +BEAMEROUTPUT="$(xrandr | grep ' connected ' | cut -f1 -d' ' | grep -v LVDS)" + +DEFRESOLUTION="$(xrandr | grep LVDS -A 4 | egrep '\+$' | sed 's/^ *//' | cut -f1 -d' ')" + +if [ -z "$BEAMEROUTPUT" ]; then + echo "Please connect Beamer" + exit 1 +fi + +#display Beamer in Display Resolution +xrandr --addmode $BEAMEROUTPUT $DEFRESOLUTION + +#add Beamer Resolution to Laptop Display +#xrandr --newmode 1024x600x60.0 60.00 1024 1488 1520 1600 600 903 909 912 +#xrandr --addmode $BEAMEROUTPUT 1024x600x60.0 +xrandr --newmode "1280x800@60" 83.91 1280 1312 1624 1656 800 816 824 841 +xrandr --addmode $BEAMEROUTPUT "1280x800@60" +xrandr --addmode $LVDSOUTPUT "1280x800@60" + +if [ -n "$1" ]; then + gnome-display-properties & +else + xrandr --output $BEAMEROUTPUT --mode $DEFRESOLUTION --same-as $LVDSOUTPUT +fi + -- 1.7.10.4