From b29dee9a3b5f77baadb8d788f94b01d4f7535b7f Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 30 Sep 2026 20:00:21 +0200 Subject: fix(install): raise the install tab only when there is something to do The recap was handed to the steps window on every run, so the file always existed. Any later poke, such as udt-grub or udt-homepage starting from a login's wallpaper restore, reopened the window on an old summary with nothing to act on. Keep the tab only when install.sh failed or printed a command; clear it otherwise. Co-Authored-By: Claude Opus 5.5 --- install.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'install.sh') diff --git a/install.sh b/install.sh index 7b6ca28..95d3325 100755 --- a/install.sh +++ b/install.sh @@ -8,14 +8,19 @@ repo="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" target="$HOME/.config/rofi/udt" # Everything this prints also becomes the install tab of quickshell's steps -# window, from whichever caller: the usual one is the appearance panel, not a -# terminal, so the hints are assumed wanted on screen. The script reruns -# itself as a child so the output can be both shown live and kept whole. +# window when there is something to do, from whichever caller: the usual one +# is the appearance panel, not a terminal, so the hints are assumed wanted on +# screen. The script reruns itself as a child so the output can be both shown +# live and kept whole. if [ -z "${UDT_INSTALL_CHILD:-}" ]; then log="$(mktemp)" trap 'rm -f "$log"' EXIT rc=0 UDT_INSTALL_CHILD=1 "$repo/install.sh" "$@" 2>&1 | tee "$log" || rc=$? + # Only a failure or a command to run (a line indented two spaces) is + # something to do; otherwise the tab is cleared, so a login's wallpaper + # restore, which pokes the window, does not reopen a stale recap. + if [ "$rc" -eq 0 ] && ! grep -q '^ ' "$log"; then : > "$log"; fi "$repo/bin/udt-steps" install < "$log" exit "$rc" fi -- cgit v1.2.3