#!/bin/sh
set -e

DIR=/tmp/testhome
rm -rf $DIR
mkdir -p $DIR
export XDG_CONFIG_HOME=$DIR/config
export XDG_DATA_HOME=$DIR/data
export XDG_RUNTIME_DIR=$DIR/runtime

eval `dbus-launch`
trap "kill $DBUS_SESSION_BUS_PID" 0 TERM INT QUIT ABRT

echo "idle-delay default:"
gsettings get org.gnome.desktop.session idle-delay

echo "changing idle-delay to 10:"
gsettings set org.gnome.desktop.session idle-delay 10

echo "idle-delay after:"
gsettings get org.gnome.desktop.session idle-delay
