diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-29 12:00:49 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-29 12:00:49 +0200 |
| commit | 7922703030c3c69b29e7e6e062d7ec8c6dcbd8cd (patch) | |
| tree | 0c6fae10148d00866d6ca511e706225063ce4868 | |
| parent | 2eed7f52799a655b62f4a64dcc1e620a119dc13d (diff) | |
| download | quickshell-7922703030c3c69b29e7e6e062d7ec8c6dcbd8cd.tar.gz quickshell-7922703030c3c69b29e7e6e062d7ec8c6dcbd8cd.zip | |
feat(appearance): recap tab first, consumer tabs by display name
install.sh's tab is the overview of a whole run, so it leads as "General
recap"; the consumer tabs follow, labelled GRUB, SDDM and Homepage. File
names stay the producers' short ids, and one without a label shows under
its own name, so a new producer still needs no edit here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| -rw-r--r-- | appearance/README.md | 2 | ||||
| -rw-r--r-- | appearance/Steps.qml | 14 | ||||
| -rw-r--r-- | appearance/StepsWindow.qml | 2 |
3 files changed, 13 insertions, 5 deletions
diff --git a/appearance/README.md b/appearance/README.md index a152a03..467dcd3 100644 --- a/appearance/README.md +++ b/appearance/README.md @@ -117,7 +117,7 @@ a theme when they restart, and neovim needs `:colorscheme udt`. A separate window, `StepsWindow.qml`, for the manual steps unified-desktop-theme cannot run itself: the root copies into `/boot` and `/usr/share/sddm`, the finish on the homepage host, and the last `install.sh` -log. Its `udt-steps` writes one file per consumer under `~/.cache/udt/steps/` +log, shown first as "General recap". Its `udt-steps` writes one file per consumer under `~/.cache/udt/steps/` and calls the `steps` verb, which reloads the tabs and opens the window if any remain; an empty file set closes it. Nothing is watched: the poke is the signal. The same verb reopens it after Close. diff --git a/appearance/Steps.qml b/appearance/Steps.qml index 5bab158..ec0a5b7 100644 --- a/appearance/Steps.qml +++ b/appearance/Steps.qml @@ -26,8 +26,13 @@ Singleton { readonly property string dir: `${Quickshell.env("HOME")}/.cache/udt/steps` - // [{ name, blocks: [{ cmd, text }] }], sorted by name. + // [{ name, label, blocks: [{ cmd, text }] }]: the install.sh recap first, + // then one tab per consumer by name. A file with no label here shows + // under its own name, so a new producer needs no edit. property var tabs: [] + readonly property var labels: ({ + install: "General recap", grub: "GRUB", sddm: "SDDM", homepage: "Homepage", + }) signal loaded // A line indented two spaces is a command, and a run of them is one block @@ -81,8 +86,11 @@ Singleton { onStreamFinished: { root.tabs = text.split("\x1e").filter(s => s.length).map(rec => { const nl = rec.indexOf("\n"); - return { name: rec.slice(0, nl), blocks: root.parse(rec.slice(nl + 1)) }; - }); + const name = rec.slice(0, nl); + return { name: name, label: root.labels[name] ?? name, + blocks: root.parse(rec.slice(nl + 1)) }; + }).sort((a, b) => (b.name === "install") - (a.name === "install") + || a.label.localeCompare(b.label)); root.loaded(); } } diff --git a/appearance/StepsWindow.qml b/appearance/StepsWindow.qml index fef1d89..8117885 100644 --- a/appearance/StepsWindow.qml +++ b/appearance/StepsWindow.qml @@ -90,7 +90,7 @@ Scope { model: Steps.tabs Tab { required property var modelData - text: modelData.name + text: modelData.label selected: root.current !== null && root.current.name === modelData.name onClicked: root.tab = modelData.name } |
