Respect $XDG_CONFIG_HOME in openbox-session
[mikachu/openbox.git] / data / xsession / openbox-session.in
index b3f1c05..259dc58 100644 (file)
@@ -1,6 +1,13 @@
 #!/bin/sh
 
-AUTOSTART="$HOME/.config/openbox/autostart.sh"
+if test -n "$1"; then
+    echo "Syntax: openbox-session"
+    echo
+    echo "See the openbox-session(1) manpage for help."
+  exit
+fi
+
+AUTOSTART="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/autostart.sh"
 GLOBALAUTOSTART="@configdir@/openbox/autostart.sh"
 
 if test -e $AUTOSTART; then