diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-16 17:19:17 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-16 17:19:17 +0100 |
| commit | 6d60c2a0af28afd8bde3fc41c92f759e10845221 (patch) | |
| tree | 9def4223d99a037c797f832a2e7916c8904a4245 | |
| parent | a3fa6524b744ea062ea0197bb3a0fec7ec9c6b54 (diff) | |
| download | quickshell-6d60c2a0af28afd8bde3fc41c92f759e10845221.tar.gz quickshell-6d60c2a0af28afd8bde3fc41c92f759e10845221.zip | |
feat(status): a game on the Xbox turns presentation on
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| -rw-r--r-- | desktop/modules/deckit/DeckItServicesPage.qml | 2 | ||||
| -rw-r--r-- | desktop/modules/deckit/Modules.js | 4 | ||||
| -rw-r--r-- | desktop/modules/status/README.md | 4 | ||||
| -rw-r--r-- | shared/Status.qml | 11 |
4 files changed, 13 insertions, 8 deletions
diff --git a/desktop/modules/deckit/DeckItServicesPage.qml b/desktop/modules/deckit/DeckItServicesPage.qml index e02cf16..5ef0273 100644 --- a/desktop/modules/deckit/DeckItServicesPage.qml +++ b/desktop/modules/deckit/DeckItServicesPage.qml @@ -32,6 +32,8 @@ Column { placeholder: col.st.placeholder("llm", "url") } Setting { store: col.st; section: "k1c"; key: "url"; label: "K1C Moonraker" placeholder: "http://ip:7125"; hint: "The printer's Moonraker address, for the K1C tab. Empty: no printer." } + Setting { store: col.st; section: "xbox"; key: "client_id"; label: "Xbox client id" + placeholder: "Azure app client id"; hint: "Your Azure app registration, for the Xbox tab. Sign in on the tab." } Setting { store: col.st; section: "sbbuilder"; key: "host"; label: "Build VM host" placeholder: col.st.placeholder("sbbuilder", "host"); hint: "ssh host alias; runs sbb-remote jobs there." } } diff --git a/desktop/modules/deckit/Modules.js b/desktop/modules/deckit/Modules.js index 853f74f..7c345cf 100644 --- a/desktop/modules/deckit/Modules.js +++ b/desktop/modules/deckit/Modules.js @@ -14,10 +14,10 @@ // deck-it's [modules] split for the pages: the ones with a tab of their own, // and the rest, which only feed the Dashboard. A module deck-it adds later // lands with the Dashboard ones until it is listed here. -var TABS = ["windows", "obs", "k1c", "assistant", "vm"]; +var TABS = ["windows", "obs", "k1c", "assistant", "vm", "xbox"]; var NAMES = { stats: "System", music: "Music", llm: "LLM usage", tablet: "Tablet", sbbuilder: "Build VM", actions: "Action icons", windows: "Windows", - obs: "OBS", k1c: "K1C printer", assistant: "Assistant", vm: "VMs" }; + obs: "OBS", k1c: "K1C printer", assistant: "Assistant", vm: "VMs", xbox: "Xbox" }; function tabs(all) { return all.filter(m => TABS.includes(m)); } function parts(all) { return all.filter(m => !TABS.includes(m)); } diff --git a/desktop/modules/status/README.md b/desktop/modules/status/README.md index 064044e..1edec03 100644 --- a/desktop/modules/status/README.md +++ b/desktop/modules/status/README.md @@ -2,8 +2,7 @@ Desktop modes as state: `dnd`, `presentation`, `nolock`, `quiet` and `nolamp`, owned by the `Status` singleton and stored as files under `$XDG_RUNTIME_DIR`. A sixth, -`status.gaming`, is written only by the shell's game detector; it is not a -mode `statusctl` exposes. +`status.gaming` is written only by the shell's game detector and `status.xbox` only by deck-it while the Xbox runs a game; neither is a mode `statusctl` exposes, and either one turns presentation on. ## The files are the interface @@ -13,6 +12,7 @@ mode `statusctl` exposes. $XDG_RUNTIME_DIR/status.quiet $XDG_RUNTIME_DIR/status.nolamp $XDG_RUNTIME_DIR/status.gaming + $XDG_RUNTIME_DIR/status.xbox Each holds `0` or `1`; a missing file means off. That directory is tmpfs, so a reboot resets every mode and there is no cleanup code. A shell restart does diff --git a/shared/Status.qml b/shared/Status.qml index ab45e99..727f32b 100644 --- a/shared/Status.qml +++ b/shared/Status.qml @@ -33,9 +33,10 @@ Singleton { readonly property bool dnd: dndFile.value // Set by the game detector below, on its own file so it never fights the // manual toggle: presentation is the OR, and a game ending clears only its - // half. A manual "on" therefore survives a game session. - readonly property bool gaming: gamingFile.value - readonly property bool presentation: presFile.value || gamingFile.value + // half. A manual "on" therefore survives a game session. status.xbox is + // the same for a game on the Xbox, written by deck-it's xbox module. + readonly property bool gaming: gamingFile.value || xboxFile.value + readonly property bool presentation: presFile.value || gaming // Stored as "auto-lock disabled", so the missing-file default of off is // the wanted default of locking on. The row inverts it for the label. readonly property bool nolock: nolockFile.value @@ -109,7 +110,7 @@ Singleton { // The detector calls this every poll; a write on an unchanged value would // still land as an atomic write and re-fire the FileView watch for nothing. function setGaming(on) { - if (on !== root.gaming) gamingFile.write(on); + if (on !== gamingFile.value) gamingFile.write(on); } // The timed disable re-enables itself. Runs only while a deadline is @@ -234,4 +235,6 @@ Singleton { ModeFile { id: nolampFile; path: root.dir + "/status.nolamp" } // Written only by the game detector above, never by statusctl. ModeFile { id: gamingFile; path: root.dir + "/status.gaming" } + // Written only by deck-it while the Xbox runs a game. + ModeFile { id: xboxFile; path: root.dir + "/status.xbox" } } |
