aboutsummaryrefslogtreecommitdiffstats
path: root/appearance/Steps.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-29 12:00:49 +0200
committerDanilo M. <danix@danix.xyz>2026-09-29 12:00:49 +0200
commit7922703030c3c69b29e7e6e062d7ec8c6dcbd8cd (patch)
tree0c6fae10148d00866d6ca511e706225063ce4868 /appearance/Steps.qml
parent2eed7f52799a655b62f4a64dcc1e620a119dc13d (diff)
downloadquickshell-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>
Diffstat (limited to 'appearance/Steps.qml')
-rw-r--r--appearance/Steps.qml14
1 files changed, 11 insertions, 3 deletions
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();
}
}