diff options
Diffstat (limited to 'appearance/Steps.qml')
| -rw-r--r-- | appearance/Steps.qml | 14 |
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(); } } |
