From 3bcadc0fd35cb1e077a77c847bbc044ca2fabce3 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 29 Sep 2026 11:56:14 +0200 Subject: feat(steps): hand pending root steps to a quickshell window Notification balloons carried the GRUB and homepage root commands, but a balloon cannot stay open while its commands are pasted into a root shell. bin/udt-steps NAME writes a consumer's pending steps to ~/.cache/udt/steps/NAME and pokes quickshell's appearance shell, which shows one tab per file on DP-3. Empty stdin clears the tab, so producers report on every run and a consumer that caught up drops out by itself. udt-grub and udt-homepage now route through it. install.sh's SDDM block checks what is installed and reports only the steps still missing, rather than printing the full install on every run. udt-homepage remembers the last staged pair, since udt-accent now also runs on icon switches, which change neither file and would re-raise the finish steps for nothing. Co-Authored-By: Claude Opus 5.5 --- bin/udt-steps | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 bin/udt-steps (limited to 'bin/udt-steps') diff --git a/bin/udt-steps b/bin/udt-steps new file mode 100755 index 0000000..da4aca0 --- /dev/null +++ b/bin/udt-steps @@ -0,0 +1,36 @@ +#!/bin/bash +# udt-steps: hand a consumer's pending manual steps to the steps window. +# Copyright (C) 2026 Danilo M. +# Licensed under the GNU General Public License v2 only. +# +# Usage: | udt-steps NAME +# +# stdin becomes the NAME tab of quickshell's steps window, one file per +# consumer under ~/.cache/udt/steps/. Empty stdin clears the tab: a consumer +# that is up to date has nothing to ask for. Either way the running shell is +# poked over IPC, which reloads the tabs and opens the window when any remain. +# +# Format: a line indented two spaces is a command, and a run of them is one +# block with its own copy button. Everything else is prose. So the root +# commands producers already printed for a terminal read the same here. + +name="${1:?usage: udt-steps NAME}" +case "$name" in + *[!a-z0-9-]*) echo "udt-steps: bad name '$name'" >&2; exit 2 ;; +esac + +dir="$HOME/.cache/udt/steps" +mkdir -p "$dir" +text="$(cat)" +if [ -z "$text" ]; then + rm -f "$dir/$name" +else + # Atomic, so the shell never reads half a file. + printf '%s\n' "$text" > "$dir/.$name.tmp" && mv "$dir/.$name.tmp" "$dir/$name" +fi + +repo="$(dirname "$(readlink -f "$0")")/.." +qs_dir="$(realpath -m "$repo/../quickshell/appearance")" +[ -f "$qs_dir/shell.qml" ] && command -v qs >/dev/null 2>&1 && + timeout 5 qs -p "$qs_dir" ipc call appearance steps >/dev/null 2>&1 +exit 0 -- cgit v1.2.3