summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/xfce4/xinitrc4
-rw-r--r--.xinitrc40
-rw-r--r--.xsessionrc17
3 files changed, 42 insertions, 19 deletions
diff --git a/.config/xfce4/xinitrc b/.config/xfce4/xinitrc
deleted file mode 100644
index b2e41f6..0000000
--- a/.config/xfce4/xinitrc
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-. $HOME/.xsessionrc
-sh /etc/xdg/xfce4/xinitrc $@
diff --git a/.xinitrc b/.xinitrc
new file mode 100644
index 0000000..3143dc1
--- /dev/null
+++ b/.xinitrc
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+session=$1
+
+#
+# XKB is not set here anymore -- instead we use the standard altgr_intl
+# with some more options
+# set the following in X11: "terminate:ctrl_alt_bksp,grp:menu_toggle,compose:rwin,caps:escape"
+#
+
+# set IM to XIM, so it reads .XCompose
+export GTK_IM_MODULE=xim
+export QT_IM_MODULE=xim
+
+[ x$GPG_AGENT_INFO = "x" ] && eval $(gpg-agent --daemon)
+
+# start urxvt daemon
+urxvtd -f -o -q
+
+[[ $session == session ]] && exit
+
+if [ -d /etc/X11/xinit/xinitrc.d ]; then
+ for i in /etc/X11/xinit/xinitrc.d/* ; do
+ if [ -x "$i" ]; then
+ . "$i"
+ fi
+ done
+fi
+
+xrdb -merge $HOME/.Xresources
+$HOME/.i3/scripts/monitors.sh 2
+
+case $session in
+ [xX]fce|[xX]fce4) exec startxfce4;;
+ *)
+ . $HOME/.fehbg
+ exec i3 -V > $HOME/.i3/i3.log 2>&1
+ ;;
+esac
+# exec herbstluftwm
diff --git a/.xsessionrc b/.xsessionrc
index 4e44dfa..2321d55 100644
--- a/.xsessionrc
+++ b/.xsessionrc
@@ -1,16 +1,3 @@
-#!/bin/sh
+#!/bin/bash
-#
-# XKB is not set here anymore -- instead we use the standard altgr_intl
-# with some more options
-# set the following in X11: "terminate:ctrl_alt_bksp,grp:menu_toggle,compose:rwin,caps:escape"
-#
-
-# set IM to XIM, so it reads .XCompose
-export GTK_IM_MODULE=xim
-export QT_IM_MODULE=xim
-
-[ x$GPG_AGENT_INFO = "x" ] && eval $(gpg-agent --daemon)
-
-# start urxvt daemon
-urxvtd -f -o -q
+bash .xinitrc session