Maybe probably hopefully fix that longstanding no-arguments bug?

This commit is contained in:
Salt 2020-08-10 20:57:35 -05:00
parent 2e2f6a64b5
commit 3b60400b4d
2 changed files with 4 additions and 3 deletions

View File

@ -73,7 +73,7 @@ Firestarter, in addition to spawning the programs in the default configs, also i
* 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. This requires that the target be a simple invocation of the WM; `TERMINAL=urxvt i3` will not work.
* In addition to this, setting the `FS_DIEONWM` variable makes firestarter automatically end the session if the WM were to die for any reason. This requires that the target not contain any environment variable declarations; `TERMINAL=urxvt i3` would not work. Arguments are okay.
## Contribution

View File

@ -325,10 +325,11 @@ step_wait() {
[ -n "$_optdryrun" ] && exit 0
trap step_logout EXIT
log "Checking for window manager" 2
if [ -n "$FS_DIEONWM" ] && gettarget "$_optconfigdir/wm"; then
if [ -n "$FS_DIEONWM" ] && gettarget "$_optconfigdir/wm" && has strings; then
target="$_return"
for job in $(jobs -p); do
if [ "$target" = "$(cat /proc/$job/cmdline)" ]; then
# Trailing space here is due to an idiosyncracy with strings
if [ "$target " = "$(cat /proc/$job/cmdline | strings -1 -s ' ')" ]; then
log "Waiting for WM to exit: \"$target\""
wait "$job"
exit 0