1
0
Fork 0
mirror of https://github.com/kastdeur/dotfiles.git synced 2024-11-09 21:43:30 +01:00
dotfiles/X11/xinitrc

43 lines
1.3 KiB
Text
Raw Normal View History

2016-10-03 10:30:30 +02:00
#!/bin/sh
# Default values for session and term
[ "$1" ] || set -- cinnamon
TERM=urxvt
# Source the Standard Stuff from this machine
2016-10-03 10:30:30 +02:00
. /etc/X11/xinit/xinitrc-common
if [ -f $HOME/.Xclients ]; then
exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients || \
exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients
elif [ -f /etc/X11/xinit/Xclients ]; then
exec $CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients || \
exec $CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients
else
# Failsafe settings. Although we should never get here
# (we provide fallbacks in Xclients as well) it can't hurt.
[ -x /usr/bin/xsetroot ] && /usr/bin/xsetroot -solid '#222E45'
[ -x /usr/bin/xclock ] && /usr/bin/xclock -geometry 100x100-5+5 &
[ -x /usr/bin/xterm ] && xterm -geometry 80x50-50+150 &
[ -x /usr/bin/twm ] && /usr/bin/twm
fi
2020-03-07 01:54:09 +01:00
# Source the xprofile files
[ -f /etc/xprofile ] && . /etc/xprofile
[ -f ~/.xprofile ] && . ~/.xprofile
2020-03-07 01:54:09 +01:00
# Set Desktop or Window Manager
2016-10-03 10:30:30 +02:00
case $1 in
cinnamon) set -- cinnamon-session;;
gnome) set -- gnome-session;;
kde) set -- startkde;;
xfce) set -- xfce4-session;;
awesome) set -- awesome;;
enlightenment) set -- enlightenment_start;;
2016-10-03 10:30:30 +02:00
esac
# Run the session, if it doesn't work try TERM,
# finally fallback to xterm if there's nothing
exec "$@" || exec "$TERM" || exec xterm