#!/bin/sh
-AUTOSTART="$HOME/.config/openbox/autostart"
+AUTOSTART="$HOME/.config/openbox/autostart.sh"
+GLOBALAUTOSTART="@configdir@/openbox/autostart.sh"
if test -e $AUTOSTART; then
- # sleep for 1 second so Openbox is there before anything else
- (sleep 1 && . $AUTOSTART) &
+ . $AUTOSTART
+else
+ if test -e $GLOBALAUTOSTART; then
+ . $GLOBALAUTOSTART
+ fi
fi
exec @bindir@/openbox "$@"