summaryrefslogtreecommitdiff
path: root/.xinitrc
diff options
context:
space:
mode:
Diffstat (limited to '.xinitrc')
-rw-r--r--.xinitrc15
1 files changed, 15 insertions, 0 deletions
diff --git a/.xinitrc b/.xinitrc
new file mode 100644
index 0000000..d93adeb
--- /dev/null
+++ b/.xinitrc
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+if [ "$DISPLAY_SESSION" = "dwm" ]; then
+ session_line=dwm
+elif [ "$DISPLAY_SESSION" = "openbox" ]; then
+ session_line=openbox-session
+else
+ echo "DISPLAY_SESSION not specified. Exiting..."
+ exit 1
+fi
+
+[ -f /etc/xprofile ] && . /etc/xprofile
+[ -f ~/.xprofile ] && . ~/.xprofile
+
+exec "$session_line"