aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-16 17:19:14 +0100
committerDanilo M. <danix@danix.xyz>2026-11-16 17:19:14 +0100
commitab02a2e982d145333d843fe84087b5fdd0e05b38 (patch)
treeed6990d7ac0e50be4cf80cd60a007c586752681f
parent880b3728a46f70e65f53135d1e21c786e744262c (diff)
downloaddeck-it-ab02a2e982d145333d843fe84087b5fdd0e05b38.tar.gz
deck-it-ab02a2e982d145333d843fe84087b5fdd0e05b38.zip
docs: the Xbox tab
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--AGENTS.md13
-rw-r--r--README.md20
2 files changed, 31 insertions, 2 deletions
diff --git a/AGENTS.md b/AGENTS.md
index 7f40147..9733b87 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -93,6 +93,19 @@ Keep the server dependency-free apart from that one package.
- `tablet` reads the tablet's battery (`dumpsys battery`) and Wi-Fi (`cmd wifi
status`, Android 11+) over adb, from the device whose reverse carries the
dashboard socket; reads are cached 10s.
+- `xbox` reads Xbox Live with the user's own Azure app (`[xbox] client_id`, a
+ public client for personal accounts): device code sign-in started from the
+ tab, the refresh token in `~/.config/deck-it/xbox-token.json` (0600), the
+ MS → user token → XSTS chain in memory. A thread reads presence and the
+ consoles (`xccs`) every 30s, profile, recent titles (titlehub, minutes from
+ userstats), the last achievements and friends every 10 min and on a title
+ change; an endpoint that refuses keeps its last data. A foreground title
+ that titlehub calls a Game is `playing`: `$XDG_RUNTIME_DIR/status.xbox`
+ gets 1 (keystone ORs it into presentation) and `xbox.js`'s `peek` returns
+ `Infinity` once per `session`, which `app.js` reads as "show and stay".
+ Console actions are `xccs` commands (power: tap wakes, hold turns off;
+ media and volume), for a console id the last state listed. Endpoints and
+ bodies follow xbox-webapi-python; Microsoft documents none of them.
- `assistant` is a client of desktop-assistant's socket
(`$XDG_RUNTIME_DIR/desktop-assistant.sock`, JSON lines; every client sees
every event); a reader thread folds events into the state the tab polls
diff --git a/README.md b/README.md
index 228f1fe..8ef57a1 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ Turns an Android tablet into a second monitor, a stream-deck and an always-on
control surface for a Slackware Hyprland desktop.
A web page on the tablet has tabs for a dashboard, windows, OBS, the K1C
-printer, the assistant and the VMs. A second headless output is streamed to AVNC as an extra
+printer, the assistant, the VMs and the Xbox. A second headless output is streamed to AVNC as an extra
monitor. Everything runs on the PC and reaches the tablet through `adb reverse`;
there is no cloud, account or app-store install.
@@ -50,7 +50,7 @@ launchers included, with a Restart button to apply a save.
## Usage
-- Tabs: **Dashboard**, **Windows**, **OBS**, **K1C**, **Assistant**, **VMs**. Swipe the content sideways to change
+- Tabs: **Dashboard**, **Windows**, **OBS**, **K1C**, **Assistant**, **VMs**, **Xbox**. Swipe the content sideways to change
tab; ⟳ at the top right reloads the page.
- `deck-it install` prints the `exec-once` line for USB autostart.
- `config.toml` holds the defaults: display, Wi-Fi address, workspaces,
@@ -82,6 +82,22 @@ launchers included, with a Restart button to apply a save.
pick the model, and use the canvas's Ask presets and Do ops on a file you
choose in a dialog on the PC (add a Translate preset on keystone's Ask
presets page to get one here).
+- The Xbox tab shows your profile (gamertag, gamerpic, gamerscore), what you
+ are playing, your consoles (power state, storage), recent games with
+ achievement progress and hours played, recent achievements and friends. Tap
+ a console's power button to wake it, hold to turn it off; media and volume
+ buttons control what it plays. While a game runs, keystone's presentation
+ mode turns on and the tablet switches to the tab once per session.
+ It needs an app registration of your own (no secret, no API permissions): in
+ the Microsoft Entra admin center, App registrations, New registration, pick
+ "Personal Microsoft accounts only" and the redirect URI platform "Public
+ client/native (mobile & desktop)" with `http://localhost`, then under
+ Authentication allow public client flows. Put its Application (client) ID in
+ `[xbox] client_id` (keystone's deck-it Services page or
+ `~/.config/deck-it/config.toml`) and sign in on the tab with the code it
+ shows. The refresh token is kept in `~/.config/deck-it/xbox-token.json`
+ (mode 0600). Console control needs Remote features on and the Sleep power
+ mode on the console.
- The screen stays on while the dashboard is in front.
## License