diff options
Diffstat (limited to 'swob.sh')
| -rwxr-xr-x | swob.sh | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2,7 +2,7 @@ # SPDX-FileCopyrightText: 2023-2024 The Remph <lhr@disroot.org> # SPDX-License-Identifier: GPL-3.0-or-later -set ${BASH_VERSION:+-o pipefail} -efmu +set ${BASH_VERSION:+-o pipefail} -efu wobfifo=$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY.swob wobini= @@ -44,11 +44,11 @@ start_wob() { set_wobini # spawn wob process with temporary file(s) - ( + { trap 'rm "$wobfifo"' 0 # Don't `exec' wob here, else the trap won't work - wob -c "$wobini" -v <$wobfifo - ) & + wob -c "$wobini" <$wobfifo + } & } do_cmd_get_percent() { @@ -104,4 +104,4 @@ start_wob # soon as it's done sleeping (the existing situation is that as long as one # script sleeps, the shell that spawned the wob process will wait until that # sleep is done) -test -z $! || wait $! +test -z ${!-} || wait $! # surprisingly, $! could be unset (not just zero-length) |
