2018-10-20 14:09:54 -05:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Salt's .xinitrc
|
|
|
|
# Copyright (C) 2018 salt <salt@lap-th-e560-0>
|
|
|
|
#
|
|
|
|
# Distributed under terms of the MIT license.
|
|
|
|
#
|
|
|
|
|
2018-10-20 17:13:39 -05:00
|
|
|
die() {
|
|
|
|
echo "Failed to start session" >&2
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2018-11-13 21:24:07 -06:00
|
|
|
# Set up our session target
|
|
|
|
which i3 > /dev/null 2>&1 && export STARTUP="i3"
|
|
|
|
which bspwm > /dev/null 2>&1 && export STARTUP="bspwm"
|
|
|
|
[ -x "$HOME/.concession/concession" ] && export STARTUP="$HOME/.concession/concession"
|
|
|
|
if [ -x "$HOME/.dsk/dsk-xinit" ]; then
|
|
|
|
export DSK_HOME="$HOME/.dsk"
|
|
|
|
export STARTUP="$DSK_HOME/dsk-xinit"
|
|
|
|
fi
|
|
|
|
[ -z ${STARTUP+x} ] && die
|
|
|
|
|
|
|
|
# Execute Xsession stuff
|
|
|
|
[ -r /etc/X11/Xsession ] && . /etc/X11/Xsession
|
|
|
|
|
|
|
|
# Execute our target directly, if necessary
|
|
|
|
[ -z "${STARTUP+x}" ] || exec "$STARTUP"
|
|
|
|
|
|
|
|
# If we get here, we haven't exec'd a target and must die
|
|
|
|
die
|
2018-10-20 14:09:54 -05:00
|
|
|
|