Created
January 24, 2013 19:08
-
-
Save rafi/4626560 to your computer and use it in GitHub Desktop.
lightdm display setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# V-1.0 by Hanynowsky - April 2012. | |
# I am a very basic script that works around bug 874241 repprted in launchpad. | |
XCOM0=`xrandr -q | grep 'HDMI1 connected'` | |
XCOM1=`xrandr --output HDMI1 --primary --mode 1920x1080 --output LVDS1 --mode 1366x768 --below HDMI1` | |
XCOM2=`xrandr --output LVDS1 --mode 1366x768` | |
# if the external monitor is connected, then we tell XRANDR to set up an extended desktop | |
if [ -n "$XCOM0" ] || [ ! "$XCOM0" = "" ]; then echo $XCOM1 | |
# if the external monitor is disconnected, then we tell XRANDR to output only to the laptop screen | |
else echo $XCOM2 | |
fi | |
exit 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment