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() {
|
2018-11-23 19:02:30 -06:00
|
|
|
if [ -z "$1" ]; then
|
|
|
|
echo "Failed to start session" >&2
|
|
|
|
else
|
|
|
|
echo "Failed to start session: $1" >&2
|
|
|
|
fi
|
2018-10-20 17:13:39 -05:00
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2018-11-13 21:24:07 -06:00
|
|
|
# Set up our session target
|
2019-06-21 22:58:56 -05:00
|
|
|
export FS_DIEONWM=1
|
2019-06-26 05:48:17 -05:00
|
|
|
export XDG_CURRENT_DESKTOP=MATE
|
2019-06-21 22:58:56 -05:00
|
|
|
if [ -x "$HOME/.firestarter/firestarter" ]; then
|
|
|
|
export STARTUP="$HOME/.firestarter/firestarter"
|
|
|
|
elif [ -x "$HOME/Projects/firestarter/firestarter" ]; then
|
|
|
|
export STARTUP="$HOME/Projects/firestarter/firestarter"
|
2018-11-13 21:24:07 -06:00
|
|
|
fi
|
2018-11-26 03:36:59 -06:00
|
|
|
[ -z "$STARTUP" ] && die "No session target available"
|
2018-11-13 21:24:07 -06:00
|
|
|
|
2018-11-26 03:36:59 -06:00
|
|
|
# Execute our target
|
|
|
|
# Yes shellcheck, the rest of the code is an error handler
|
|
|
|
# shellcheck disable=2093
|
|
|
|
exec "$STARTUP"
|
2018-11-13 21:24:07 -06:00
|
|
|
|
|
|
|
# If we get here, we haven't exec'd a target and must die
|
2018-11-23 19:02:30 -06:00
|
|
|
die "Miscellaneous error"
|
2018-10-20 14:09:54 -05:00
|
|
|
|