comparison bin/swapscreens.sh @ 139:206d7550bf45

add a program for swapping screens
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 07 May 2011 20:00:36 -0700
parents
children 71345f4de3ce
comparison
equal deleted inserted replaced
138:e873af1d1674 139:206d7550bf45
1 #!/bin/bash
2
3 # swap screens between internal laptop monitor and external monitor
4
5 INTERNAL="LVDS1"
6 EXTERNAL="VGA1"
7 INTERNAL_MODE="1366x768"
8 EXTERNAL_MODE="1600x1200"
9
10 xwininfo -root | grep "geometry $EXTERNAL_MODE"
11 if [ $? -eq 0 ]
12 then
13 xrandr --output $EXTERNAL --off --output $INTERNAL --mode $INTERNAL_MODE
14 else
15 xrandr --output $INTERNAL --off --output $EXTERNAL --mode $EXTERNAL_MODE
16 fi