summaryrefslogtreecommitdiff
path: root/data/autostart/openbox-autostart.in
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2010-02-17 16:11:36 -0500
committerDana Jansens <danakj@orodu.net>2010-02-17 16:11:36 -0500
commitbcc31faf7ecd8b0ad3b66a75fc72145e93e6c35a (patch)
treede901ca02d357392d35e88ce42db60e8adca841f /data/autostart/openbox-autostart.in
parent7d71fb8a77ba9e2ea4938e793410f029265507a8 (diff)
revamp the autostart functionality, so autostart apps launch after openbox.
add /usr/libexec/openbox-autostart which runs the global/user scripts and launches /usr/libexec/openbox-xdg-autostart (which runs .desktop autostart stuff) make openbox-session call openbox with --startup option, to make openbox launch /usr/libexec/openbox-autostart *after* it is initialized. add /etc/xdg/openbox/environment and ~/.config/openbox/environment files to let user change environment variables (locale) for their Openbox session, which openbox-session loads before running openbox.
Diffstat (limited to 'data/autostart/openbox-autostart.in')
-rwxr-xr-xdata/autostart/openbox-autostart.in34
1 files changed, 34 insertions, 0 deletions
diff --git a/data/autostart/openbox-autostart.in b/data/autostart/openbox-autostart.in
new file mode 100755
index 00000000..3b2f5ec5
--- /dev/null
+++ b/data/autostart/openbox-autostart.in
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# Set a background color
+BG=""
+if which hsetroot >/dev/null; then
+ BG=hsetroot
+elif which esetroot >/dev/null; then
+ BG=esetroot
+elif which xsetroot >/dev/null; then
+ BG=xsetroot
+fi
+test -z $BG || $BG -solid "#303030"
+
+GLOBALAUTOSTART="@configdir@/autostart"
+AUTOSTART="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/autostart"
+
+# Run the global openbox autostart script
+if test -f $GLOBALAUTOSTART; then
+ sh $GLOBALAUTOSTART
+elif test -f $GLOBALAUTOSTART.sh; then
+ sh $GLOBALAUTOSTART.sh
+fi
+
+# Run the user openbox autostart script
+if test -f $AUTOSTART; then
+ sh $AUTOSTART
+elif test -f $AUTOSTART.sh; then
+ sh $AUTOSTART.sh
+fi
+
+# Run the XDG autostart stuff. These are found in /etc/xdg/autostart and
+# in $HOME/.config/autostart. This requires PyXDG to be installed.
+# See openbox-xdg-autostart --help for more details.
+@libexecdir@/openbox-xdg-autostart OPENBOX