.dsk: Migrate to DSK (hopefully)

This commit is contained in:
2018-11-13 21:24:07 -06:00
parent 2635dd4e4c
commit e4d359c088
19 changed files with 94 additions and 37 deletions

View File

@@ -11,44 +11,22 @@ die() {
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/concession" ] && export STARTUP="$HOME/.concession/concession"
[ -z ${STARTUP+x} ] && die
}
# 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
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
}
# Execute Xsession stuff
[ -r /etc/X11/Xsession ] && . /etc/X11/Xsession
step_start_xsession() {
# Execute Xsession stuff
[ -r /etc/X11/Xsession ] && . /etc/X11/Xsession
}
# Execute our target directly, if necessary
[ -z "${STARTUP+x}" ] || exec "$STARTUP"
step_start_manual() {
# Execute our target directly
[ -z "${STARTUP+x}" ] || exec "$STARTUP"
}
main() {
# Set up the environment
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
die
}
main $@
# If we get here, we haven't exec'd a target and must die
die