ubuntuusers.de

🚧 Am Sonntag, 5. Mai, werden ab 16 Uhr die Server aktualisiert und eine neue Inyoka-Version veröffentlicht. Das Portal wird mehrmals nicht verfügbar sein.

xrandr-custom-settings

Autor:
fatlip
Datum:
8. November 2009 07:37
Code:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#Erweiterter Desktop bei X-Server Start

# Hier die Bezeichner der Anschlüsse eintragen
EXTERNAL_OUTPUT="VGA1"
INTERNAL_OUTPUT="LVDS1"
# EXTERNAL_LOCATION kann sein: left, right, above, oder below
EXTERNAL_LOCATION="above"
 
case "$EXTERNAL_LOCATION" in
       left|LEFT)
               EXTERNAL_LOCATION="--left-of $INTERNAL_OUTPUT"
               ;;
       right|RIGHT)
               EXTERNAL_LOCATION="--right-of $INTERNAL_OUTPUT"
               ;;
       top|TOP|above|ABOVE)
               EXTERNAL_LOCATION="--above $INTERNAL_OUTPUT"
               ;;
       bottom|BOTTOM|below|BELOW)
               EXTERNAL_LOCATION="--below $INTERNAL_OUTPUT"
               ;;
       *)
               EXTERNAL_LOCATION="--left-of $INTERNAL_OUTPUT"
               ;;
esac
 
xrandr |grep $EXTERNAL_OUTPUT | grep " connected "
if [ $? -eq 0 ]; then
    xrandr --output $INTERNAL_OUTPUT --mode 1024x600 --output $EXTERNAL_OUTPUT --mode 1360x768 $EXTERNAL_LOCATION
else
    xrandr --output $INTERNAL_OUTPUT --mode 1024x600 --output $EXTERNAL_OUTPUT --off
fi