2017-10-16 14:38:02 -05:00
|
|
|
#!/bin/sh
|
2018-02-04 10:09:32 -06:00
|
|
|
# Executed by startx
|
2017-12-07 22:20:42 -06:00
|
|
|
# By calling this with arguments we can start different sessions
|
|
|
|
# eg. startx ~/.xinitrc i3 or startx ~/.xinitrc bspwm
|
|
|
|
# simply using startx, openbox is set as the default
|
2017-12-01 00:21:33 -06:00
|
|
|
|
2017-12-07 22:20:42 -06:00
|
|
|
session=${1:-openbox}
|
2018-02-04 10:09:32 -06:00
|
|
|
export WM="$session"
|
|
|
|
|
|
|
|
if [ -f /etc/X11/xinit/.Xmodmap ]; then
|
|
|
|
xmodmap /etc/X11/xinit/.Xmodmap
|
|
|
|
fi
|
2018-02-09 22:35:27 -06:00
|
|
|
|
2017-10-16 14:38:02 -05:00
|
|
|
if [ -d /etc/X11/xinit/xinitrc.d ]; then
|
2018-02-04 10:09:32 -06:00
|
|
|
for f in /etc/X11/xinit/xinitrc.d/*.sh; do
|
2017-12-01 00:21:33 -06:00
|
|
|
[ -x "$f" ] && . "$f"
|
|
|
|
done
|
2017-10-16 14:38:02 -05:00
|
|
|
fi
|
|
|
|
|
2018-02-04 10:09:32 -06:00
|
|
|
if [ -f ~/.Xresources ]; then
|
|
|
|
xrdb -load ~/.Xresources
|
|
|
|
fi
|
2018-02-09 22:35:27 -06:00
|
|
|
|
2018-02-04 10:09:32 -06:00
|
|
|
if [ -f ~/.Xmodmap ]; then
|
|
|
|
xmodmap ~/.Xmodmap
|
|
|
|
fi
|
2018-02-09 22:35:27 -06:00
|
|
|
|
2018-02-04 10:09:32 -06:00
|
|
|
if [ -f ~/.xprofile ]; then
|
|
|
|
. ~/.xprofile
|
|
|
|
fi
|
|
|
|
|
|
|
|
gnome-keyring-daemon --start --components=pkcs11 &
|
|
|
|
lxpolkit &
|
|
|
|
kbdrate -d 400 -r 50
|
|
|
|
xset r rate 400 50
|
|
|
|
xset s 3600 3600
|
2017-10-16 14:38:02 -05:00
|
|
|
|
2017-12-07 22:20:42 -06:00
|
|
|
# start the session
|
|
|
|
case $session in
|
2018-02-21 03:42:36 -06:00
|
|
|
i3|i3wm) exec i3 ;;
|
|
|
|
bsp|bspwm) exec bspwm ;;
|
|
|
|
awesome) exec awesome ;;
|
2018-02-20 07:55:53 -06:00
|
|
|
xfce|xfce4) exec startxfce4 ;;
|
|
|
|
openbox|openbox-session) exec openbox-session ;;
|
|
|
|
*) exec "$1"
|
2017-12-07 22:20:42 -06:00
|
|
|
esac
|