File syncmaster226bw of Package jw-env
# /bin/sh # xrand --addmode has non-zero exit status on nonexistant display, # but xrandr --auto --output only issues a warning on nonexistant display. # 2010-02-08, jw # 2010-07-21, jw - using xrandr output in grep VGA=VGA LVDS=LVDS xr=$(xrandr) echo $xr | grep -q VGA1 && VGA=VGA1 echo $xr | grep -q LVDS1 && LVDS=LVDS1 echo $xr | grep -q syncmaster226bw && syncmaster226bw=1 echo $xr | grep -q 1680x1050 && _1680x1050=1 echo $xr | grep -q 800x480 && _800x480=1 set -x test $_1680x1050 ||\ xrandr --newmode 1680x1050 119.00 1680 1728 1760 1840 1050 1053 1059 1080 +hsync -vsync test $syncmaster226bw ||\ xrandr --newmode syncmaster226bw 119.00 1680 1728 1760 1840 1050 1053 1059 1080 +hsync -vsync test $_800x480 ||\ xrandr --newmode 800x480 40 800 840 968 1056 480 490 492 525 xrandr --addmode $VGA 800x480 xrandr --addmode $VGA 1680x1050 xrandr --output $VGA --auto --mode 1680x1050 --above $LVDS xrandr --output $LVDS --auto --pos 656x1050