diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-29 12:00:05 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-29 12:00:05 +0200 |
| commit | 261a623de6e214a2f7f143c3ab72a5dd4a117f5c (patch) | |
| tree | 5b92d225e74394ff3497524d31c92453bb577a82 /install.sh | |
| parent | 3bcadc0fd35cb1e077a77c847bbc044ca2fabce3 (diff) | |
| download | unified-desktop-theme-261a623de6e214a2f7f143c3ab72a5dd4a117f5c.tar.gz unified-desktop-theme-261a623de6e214a2f7f143c3ab72a5dd4a117f5c.zip | |
feat(install): always hand the output to the steps window
The appearance panel is the usual way a scheme gets applied, so the hints
install.sh prints belong on screen whoever calls it, not only when the
panel pipes them. install.sh reruns itself as a child, tees the output to
the terminal and a temporary log, and passes the log to udt-steps install,
keeping the child's exit status.
With the window as its main reader, the output is now a summary: only
udt-palette's count line rather than all 86 generated paths, and a restart
hint in place of the closing ls -l dump.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'install.sh')
| -rwxr-xr-x | install.sh | 23 |
1 files changed, 19 insertions, 4 deletions
@@ -7,6 +7,19 @@ set -euo pipefail 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. +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=$? + "$repo/bin/udt-steps" install < "$log" + exit "$rc" +fi + mkdir -p "$target" "$HOME/bin" "$HOME/.cache/udt" # Merge an ini template into a live file key by key: every key the template @@ -59,7 +72,10 @@ if [ ! -f "$selector" ]; then install -Dm644 "$repo/palette/roles.conf.default" "$selector" echo "seeded $selector" fi -"$repo/bin/udt-palette" +# Only the summary line: the list of every generated file, 86 of them, buried +# the hints in the steps window. sed, not head: head would close the pipe +# early, and pipefail would read the SIGPIPE as a failed generation. +"$repo/bin/udt-palette" | sed -n 1p # Theme files are symlinked individually; accent.rasi is NOT, it points at the # generated file in the wal cache instead. @@ -356,7 +372,6 @@ fi echo "$repo/bin/udt-grub" +echo [ -n "$reloaded" ] && echo "reloaded:$reloaded" - -echo "installed:" -ls -l "$target" "$HOME/bin/udt-accent" +echo "Qt and GTK apps only reread a theme when they restart; neovim needs :colorscheme udt." |
