Mercurial > hg > config
changeset 139:206d7550bf45
add a program for swapping screens
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 07 May 2011 20:00:36 -0700 |
parents | e873af1d1674 |
children | 939ee1ab226a |
files | bin/swapscreens.sh |
diffstat | 1 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/swapscreens.sh Sat May 07 20:00:36 2011 -0700 @@ -0,0 +1,16 @@ +#!/bin/bash + +# swap screens between internal laptop monitor and external monitor + +INTERNAL="LVDS1" +EXTERNAL="VGA1" +INTERNAL_MODE="1366x768" +EXTERNAL_MODE="1600x1200" + +xwininfo -root | grep "geometry $EXTERNAL_MODE" +if [ $? -eq 0 ] +then + xrandr --output $EXTERNAL --off --output $INTERNAL --mode $INTERNAL_MODE +else + xrandr --output $INTERNAL --off --output $EXTERNAL --mode $EXTERNAL_MODE +fi \ No newline at end of file