From 0bfd4e963462bd70e78ae8e2e45e766d8eb4c387 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Wed, 11 Jul 2012 13:41:06 +0000 Subject: If we are running under a profile generate a new random one It is saved in the config so that next time it will use the same --- (limited to 'scripts') diff --git a/scripts/xinitrc b/scripts/xinitrc index fd85440..ea1ae23 100644 --- a/scripts/xinitrc +++ b/scripts/xinitrc @@ -7,10 +7,20 @@ unset SESSION_MANAGER SCRIPTS_DIR=`dirname "$0"` ROOT_DIR=`dirname "$SCRIPTS_DIR"` -if [ -f $ROOT_DIR/config ]; then - source $ROOT_DIR/config +if [ ! -f $ROOT_DIR/config ]; then + touch $ROOT_DIR/config fi +if [ ! -z $SUGAR_PROFILE ]; then + grep -q PROFILE $ROOT_DIR/config + if [ $? -eq 1 ]; then + randomstring=`> $ROOT_DIR/config + fi +fi + +source $ROOT_DIR/config + # 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. -- cgit v0.9.1