Add DIEONWM config option
This commit is contained in:
parent
2a2d475641
commit
047338140b
@ -46,13 +46,13 @@ Firestarter, in addition to spawning the programs in the default configs, also i
|
|||||||
|
|
||||||
* dbus: A dbus socket is either created or hooked into, depending on the environment, and the relevant variables are exposed to child processes.
|
* dbus: A dbus socket is either created or hooked into, depending on the environment, and the relevant variables are exposed to child processes.
|
||||||
|
|
||||||
* loginctl: Will be used to log out when firestarter dies.
|
* loginctl: When firestarter dies, loginctl will be called to eliminate the remainder of the session. If loginctl is not available, firestarter will kill off *only* the processes that it spawned.
|
||||||
|
|
||||||
* Plasma: If `kcminit` is installed, it will be invoked to configure device and theme settings. When this is the case, `XDG_CURRENT_DESKTOP` is changed to `KDE` in order for themes to actually take.
|
* Plasma: If `kcminit` is installed, it will be invoked to configure device and theme settings. When this is the case, `XDG_CURRENT_DESKTOP` is changed to `KDE` in order for themes to actually take.
|
||||||
|
|
||||||
* Qt5ct: Assuming Plasma is *not* installed, qt5ct will be used as a fallback for Qt theming.
|
* Qt5ct: Assuming Plasma is *not* installed, qt5ct will be used as a fallback for Qt theming.
|
||||||
|
|
||||||
* xhost: Firestarter will open up the session to other sessions, so you can open a TTY and spawn a window if you have to.
|
* xhost: Firestarter will open up the current session to other sessions by your user, allowing you to open a TTY and spawn your WM back in if you have to.
|
||||||
|
|
||||||
* xset: Firestarter will disable that annoying goddamn X bell. Re-enable it in `.firestarterrc` if you enjoy pain.
|
* xset: Firestarter will disable that annoying goddamn X bell. Re-enable it in `.firestarterrc` if you enjoy pain.
|
||||||
|
|
||||||
@ -70,7 +70,9 @@ Firestarter, in addition to spawning the programs in the default configs, also i
|
|||||||
|
|
||||||
## Idiosyncracies
|
## Idiosyncracies
|
||||||
|
|
||||||
* The `wm` config file is special; if it exists and a default can be found for it, firestarter will watch the `_NET_WM_NAME` atom on the root window, waiting for it to initialize before starting XDG autostarts. This prevents applications from being started before the WM is ready to manage them. You can disable this by setting `FS_NOWAITWM`.
|
* The `wm` config file is special; if it exists and a target can be found for it, firestarter will watch the `_NET_WM_NAME` atom on the root window, waiting for it to initialize before starting XDG autostarts. This prevents applications from being started before the WM is ready to manage them. You can disable this by setting `FS_NOWAITWM`.
|
||||||
|
|
||||||
|
* In addition to this, setting the `FS_DIEONWM` variable makes firestarter automatically end the session if the WM were to die for any reason.
|
||||||
|
|
||||||
## Contribution
|
## Contribution
|
||||||
|
|
||||||
|
15
firestarter
15
firestarter
@ -283,6 +283,9 @@ Start or generate a desktop environment configuration
|
|||||||
|
|
||||||
Additionally, firestarter responds to the following environment variables:
|
Additionally, firestarter responds to the following environment variables:
|
||||||
|
|
||||||
|
FS_DIEONWM If nonempty, end the session when the WM dies. This is useful
|
||||||
|
both for preventing session lock-ins and for using built-in WM
|
||||||
|
features to log out of the session.
|
||||||
FS_NOLOG If nonempty, create no log files
|
FS_NOLOG If nonempty, create no log files
|
||||||
FS_NOWAITWM If nonempty, skip waiting on the WM to initialize
|
FS_NOWAITWM If nonempty, skip waiting on the WM to initialize
|
||||||
|
|
||||||
@ -457,10 +460,20 @@ step_postexecute() {
|
|||||||
}
|
}
|
||||||
step_wait() {
|
step_wait() {
|
||||||
[ -n "$_dryrun" ] && exit 0
|
[ -n "$_dryrun" ] && exit 0
|
||||||
log "Waiting for programs to exit"
|
|
||||||
log "Send any termination signal to firestarter to log out"
|
log "Send any termination signal to firestarter to log out"
|
||||||
trap step_logout EXIT
|
trap step_logout EXIT
|
||||||
|
if [ -n "$FS_DIEONWM" ] && gettarget "$_configdir/wm" && has readlink; then
|
||||||
|
target="$_return"
|
||||||
|
for job in $(jobs -p); do
|
||||||
|
if [ "$target" = "$(readlink /proc/$job/exe)" ]; then
|
||||||
|
log "Waiting for WM to exit"
|
||||||
|
wait "$job"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
log "Waiting for programs to exit"
|
||||||
wait
|
wait
|
||||||
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
step_logout() {
|
step_logout() {
|
||||||
|
Loading…
Reference in New Issue
Block a user