summaryrefslogtreecommitdiffstats
path: root/xorg/xinitrc
diff options
context:
space:
mode:
Diffstat (limited to 'xorg/xinitrc')
-rwxr-xr-xxorg/xinitrc6
1 files changed, 5 insertions, 1 deletions
diff --git a/xorg/xinitrc b/xorg/xinitrc
index af1599c..bad549c 100755
--- a/xorg/xinitrc
+++ b/xorg/xinitrc
@@ -9,7 +9,11 @@ xset fp rehash
if [ -e /usr/bin/xrandr ]; then
if [ $(hostname) = "galahad" ]; then
- xrandr --output LVDS1 --off --output VGA1 --auto
+ if [ $(xrandr -q | grep VGA1 | awk '{print $2}') = "disconnected" ]; then
+ xrandr --output LVDS1 --auto --output VGA1 --off
+ else
+ xrandr --output LVDS1 --off --output VGA1 --auto
+ fi
fi
fi