#!/bin/sh

xsetroot -solid black -cursor_name watch

# Start-up stuff from ~/Desktop/Autostart directory, if it exists
# (as it seems to be the new standard)
if [ -d "$HOME/Desktop/Autostart" ]; then
  for i in `ls -1 ${HOME}/Desktop/Autostart/ 2>/dev/null`; do
    if [ -x $HOME/Desktop/Autostart/$i ]; then
      $HOME/Desktop/Autostart/$i &
    fi
  done
fi

if [ -f $HOME/.Xmodmap ]; then
	xmodmap $HOME/.Xmodmap
fi

# Those are my settings, change them as appropriate...
# Xft DPI: 96
# Xft.hintstyle: hintnone/hintslight/hintmedium/hintfull
# Xft hinting: 1/0

xrdb -merge - << EOF
Xft.dpi: 96
Xft.hinting: 1
Xft.hintstyle: hintmedium
EOF

# Launch xscreensaver (if available)
xscreensaver -no-splash &

xfce-mcs-manager
xfwm4 --daemon
xftaskbar4&
xfdesktop&
panel=`which xfce4-panel`
if test "x$panel" != "x" ; then
	$panel
	ret=$?
	while [ $ret -ne 0 ] ; do
		echo "A crash occured in the panel"
		echo "Please report this to the xfce4-dev@moongroup.com list"
		echo "Meanwhile the panel will be restarted"
		$panel
		ret=$?
	done
fi
xsetroot -solid black -cursor_name watch
