feat: Steamify page: Start Steam silently option (needs/hideWhen rules from --defaults --list)
Sync git.upriser.nl mirror / sync (push) Skipped

This commit is contained in:
theupriser committed 2026-10-02 07:37:13 +02:00
1 parent 46fa044ffb
commit 7ee32f926b
2 files changed
+7 -3

No files matched your search

@@ -8,6 +8,7 @@ QtObject {
readonly property var rows: [ readonly property var rows: [
{ id: "gaming", label: "SteamOS conversion", hint: "boot into gaming mode, Steam on the desktop", kind: "toggle", parent: "", on: true, selectable: true }, { id: "gaming", label: "SteamOS conversion", hint: "boot into gaming mode, Steam on the desktop", kind: "toggle", parent: "", on: true, selectable: true },
{ id: "boot", label: "Boot into", hint: "", kind: "choice", parent: "gaming", on: false, selectable: true }, { id: "boot", label: "Boot into", hint: "", kind: "choice", parent: "gaming", on: false, selectable: true },
{ id: "silent", label: "Start Steam silently", hint: "in the tray at login on the desktop, no window", kind: "toggle", parent: "gaming", needs: "boot", on: true, selectable: true },
{ id: "theme", label: "Install SteamOS theme", hint: "Vapor look (cachyos-vapor)", kind: "toggle", parent: "", on: true, selectable: true }, { id: "theme", label: "Install SteamOS theme", hint: "Vapor look (cachyos-vapor)", kind: "toggle", parent: "", on: true, selectable: true },
{ id: "glyphs", label: "Install Steam Deck/Machine icons", hint: "Deck button icons in gaming mode", kind: "toggle", parent: "", on: true, selectable: true }, { id: "glyphs", label: "Install Steam Deck/Machine icons", hint: "Deck button icons in gaming mode", kind: "toggle", parent: "", on: true, selectable: true },
{ id: "single", label: "Single user mode", hint: "no password, lock screen or log out (SDDM)", kind: "toggle", parent: "", on: true, selectable: true }, { id: "single", label: "Single user mode", hint: "no password, lock screen or log out (SDDM)", kind: "toggle", parent: "", on: true, selectable: true },
@@ -35,7 +35,9 @@ Item {
function label(r) { return (Texts.items[r.id] || {}).label || r.label; } function label(r) { return (Texts.items[r.id] || {}).label || r.label; }
function hint(r) { return (Texts.items[r.id] || {}).hint || r.hint; } function hint(r) { return (Texts.items[r.id] || {}).hint || r.hint; }
function shown(r) { return !r.parent || !!want[r.parent]; } // `needs: "boot"` (Steamify's --defaults --list): only with Boot into Desktop.
function shown(r) { return (!r.parent || !!want[r.parent]) && (r.needs !== "boot" || boot === "desktop") &&
!(r.hideWhen && want[r.hideWhen]); }
// Steamify's own rules: a sub-option needs its parent (turning a parent // Steamify's own rules: a sub-option needs its parent (turning a parent
// off turns its sub-options off); single user mode needs the conversion. // off turns its sub-options off); single user mode needs the conversion.
@@ -46,7 +48,8 @@ Item {
var r = rows[i]; var r = rows[i];
if (w[id] && r.id === id && r.parent) w[r.parent] = true; if (w[id] && r.id === id && r.parent) w[r.parent] = true;
if (!w[id] && r.parent === id && r.kind === "toggle") w[r.id] = false; if (!w[id] && r.parent === id && r.kind === "toggle") w[r.id] = false;
if (w[id] && r.parent === id && r.kind === "toggle") w[r.id] = true; // opt-out sub-options if (w[id] && r.parent === id && r.kind === "toggle") w[r.id] = !(r.hideWhen && w[r.hideWhen]); // opt-out sub-options
if (w[id] && r.hideWhen === id) w[r.id] = false; // Big Picture and a silent start exclude each other
} }
if (id === "single" && w.single) w.gaming = true; if (id === "single" && w.single) w.gaming = true;
if (id === "gaming" && !w.gaming) { w.single = false; boot = "gamescope"; } if (id === "gaming" && !w.gaming) { w.single = false; boot = "gamescope"; }
@@ -56,7 +59,7 @@ Item {
function choice() { function choice() {
var on = []; var on = [];
for (var i = 0; i < rows.length; i++) for (var i = 0; i < rows.length; i++)
if (rows[i].kind === "toggle" && want[rows[i].id]) on.push(rows[i].id); if (rows[i].kind === "toggle" && want[rows[i].id] && shown(rows[i])) on.push(rows[i].id);
if (want.gaming && boot === "desktop") on.push("boot"); if (want.gaming && boot === "desktop") on.push("boot");
// ", " (not ","): Calamares' packagechooser Summary step shows this // ", " (not ","): Calamares' packagechooser Summary step shows this
// value raw ("Install option: <value>"); steamify-install still // value raw ("Install option: <value>"); steamify-install still