Gamerig Library: gamerig's game library as a Chandra desktop module
CI / test (push) Successful in 2m25s
CI / test (push) Successful in 2m25s
- New desktop module gamerig-library (components/gamerig-library, logic in lib/gamelib): the layout of gamerig's web library (desktop/ui) in draw ops. Top bar with the Gamerig mark, app count and search; sidebar with categories and counts, running apps (switch to, stop) and rig status (GPU, display, audio); card grid with featured games two columns wide, icon tiles, category and status badges, description, install hint, Launch / Big Picture / Switch to / Stop. Typing filters, arrows + Enter launch, the wheel scrolls. Colours: follow desktop, dark, light. - New game-library capability: tables 26-28 (status, games, launch modes), request 45, in the wasmer/wasmtime stub, the MoonBit wasmhost and the Rust host-wasm. - compositor/shell/gamelib.mbt polls GET $GAMERIG_DESKTOP_API/api/state (default http://127.0.0.1:8091) every 2 s with curl on a socket and POSTs launch/stop/focus; a file:// base reads a state file (tests). - --desktop NAME picks what fills the desktop at start. scripts/gamerig-kiosk.sh now runs a hybrid kiosk with the library as the desktop (CHANDRA_KIOSK_MODE=strict for the old one). - Tests: lib/gamelib, compositor/host/gamelib_test.mbt, a host-wasm test; docs/gamerig-library.md with a screenshot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgvjzw8hHirxRsXSsE
This commit is contained in:
57 files changed
+3551
-29
No files matched your search
@@ -63,6 +63,7 @@ pub fn run(args : Array[String]) -> Int {
|
||||
let mut restore = true
|
||||
let mut kiosk : String? = None
|
||||
let mut kiosk_hybrid = false
|
||||
let mut desktop = ""
|
||||
let mut app_id = "chandra"
|
||||
let mut width = 1280
|
||||
let mut height = 720
|
||||
@@ -98,6 +99,9 @@ pub fn run(args : Array[String]) -> Int {
|
||||
kiosk = Some(args[i + 1]) // one fullscreen app, locked down
|
||||
restore = false
|
||||
i = i + 2
|
||||
} else if a == "--desktop" && i + 1 < args.length() {
|
||||
desktop = args[i + 1] // what fills the desktop: a desktop module's id, "wallpaper" or "clock-card"
|
||||
i = i + 2
|
||||
} else if a == "--kiosk-hybrid" {
|
||||
kiosk_hybrid = true // with --kiosk: keep the panel and the desktop, lock only leaving
|
||||
if kiosk is None {
|
||||
@@ -263,6 +267,9 @@ pub fn run(args : Array[String]) -> Int {
|
||||
}
|
||||
None => ()
|
||||
}
|
||||
if desktop != "" && !comp.shell.set_desktop(desktop) {
|
||||
@sys.log("--desktop " + desktop + ": no such desktop module")
|
||||
}
|
||||
if login {
|
||||
comp.start_auth_agent() // polkit's password prompts (run0, pkexec): Chandra's dialog
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user