Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/scripts/xinitrc
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-07-05 08:57:05 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-07-05 08:58:27 (GMT)
commit91e84fa1b4746fae7f4f28b0f4f39734d180f6f8 (patch)
tree74c6c43b21177bb4ce7b330a6693d37ff9cd35cc /scripts/xinitrc
parent12a3e2b63490cb6a178c2d63ace3066e1e7594c3 (diff)
Allow to configure screen resolution
Also move SUGAR_OUTPUT to the new config file
Diffstat (limited to 'scripts/xinitrc')
-rw-r--r--scripts/xinitrc16
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/xinitrc b/scripts/xinitrc
index da89c27..1421396 100644
--- a/scripts/xinitrc
+++ b/scripts/xinitrc
@@ -7,6 +7,12 @@ unset SESSION_MANAGER
SCRIPTS_DIR=`dirname "$0"`
ROOT_DIR=`dirname "$SCRIPTS_DIR"`
+if [ -f $ROOT_DIR/config ]; then
+ source $ROOT_DIR/config
+fi
+
+echo $OUTPUT
+
# Sugar doesn't handle multiple outputs properly. To avoid issues we keep the
# first output in the list returned by xrandr and turn off everything else.
@@ -15,15 +21,19 @@ OUTPUTS=`scripts/list-outputs`
for output in $OUTPUTS
do
# Default to the first output in the list
- if [ -z $SUGAR_OUTPUT ]; then
- SUGAR_OUTPUT=$output
+ if [ -z $OUTPUT ]; then
+ OUTPUT=$output
fi
- if [ $SUGAR_OUTPUT != $output ]; then
+ if [ $OUTPUT != $output ]; then
xrandr --output $output --off
fi
done
+if [ -n $RESOLUTION ]; then
+ xrandr -s $RESOLUTION
+fi
+
if [ -z $SUGAR_SESSION ]; then
export SUGAR_SESSION=yes
else