This repository has been archived on 2024-09-01. You can view files and clone it, but cannot push or open issues or pull requests.
al-skel/home/.xinitrc

44 lines
885 B
Plaintext
Raw Normal View History

2017-10-16 14:38:02 -05:00
#!/bin/sh
#
# ~/.xinitrc
# Executed by startx
# 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
session=${1:-openbox}
2017-10-16 14:38:02 -05:00
# source files in /etc/X11/xinit/xinitrc.d
2017-10-16 14:38:02 -05:00
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
2017-10-16 14:38:02 -05:00
fi
# this must be before the 'exec' command
# it sources ~/.xprofile for additional settings
[ -f ~/.xprofile ] && . ~/.xprofile
2017-10-16 14:38:02 -05:00
# start the session
case $session in
i3|i3wm)
exec i3
;;
bsp|bspwm)
exec bspwm
;;
awesome)
exec awesome
;;
xfce|xfce4)
exec startxfce4
;;
openbox|openbox-session)
exec openbox-session
;;
*)
exec $1
;;
esac