.xinitrc: Add environement setup script, disregard it

This commit is contained in:
2018-10-20 17:13:39 -05:00
parent d6f6479f88
commit dbcb72ee1f
2 changed files with 31 additions and 15 deletions

View File

@@ -6,11 +6,27 @@
# Distributed under terms of the MIT license.
#
step_get_target() {
die() {
echo "Failed to start session" >&2
exit 1
}
step_setup_target() {
# 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/conspiracy" ] && export STARTUP="$HOME/.concession/conspiracy"
[ -z ${STARTUP+x} ] && die
}
step_setup_env() {
# Ideally, you'd hook into a bunch of different DE startup stuff here
# But I only use Plasma, so there's only that here
if which kdeinit5 > /dev/null 2>&1; then
kdeinit5 &
kded5 &
export STARTUP="ksmserver \"$STARTUP\" --no-lockscreen"
fi
}
step_start_xsession() {
@@ -25,13 +41,13 @@ step_start_manual() {
main() {
# Set up the environment
step_get_target
step_setup_target
#step_setup_env
# Execute our target
step_start_xsession # Through Xsession scripts, or...
step_start_manual # ...manually, if need be
# Or maybe just die, I guess
echo "Failed to start session" >&2
exit 1
die
}
main $@