From 58e37da20ed56eef1863f259e17a819105ac33f2 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 10 Nov 2026 10:06:13 +0100 Subject: feat(deckit): settings page for deck-it, the tablet dashboard A page under Desktop for deck-it's ~/.config/deck-it/config.toml and its login line. deck-it now merges that file over its shipped config key by key, so the page writes only what differs and takes its placeholders from `deck-it defaults` rather than copying them. - Start at login edits hypr-theme's autostart.lua at once, as the Autostart page does, through Autostart.js: it re-enables a commented deck-it line or adds `deck-it wifi --wait`; off comments them out. - Every config key, with launchers picked from the installed apps (desktop ids, reorderable) and module switches built from the defaults. - A status line polls `deck-it status` every 2s while the page is open; Restart runs `deck-it stop` and the login command, then reports "Restarted" once the server runs with a tablet tunnelled, or what it saw after 30s. Shared helpers it needed: Toml.js reads plain decimals (the display scale), Store keeps a list of numbers numeric (the workspaces), and ChoiceSetting takes a store as Setting and BoolSetting already do. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/deckit/README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 desktop/modules/deckit/README.md (limited to 'desktop/modules/deckit/README.md') diff --git a/desktop/modules/deckit/README.md b/desktop/modules/deckit/README.md new file mode 100644 index 0000000..59c85fd --- /dev/null +++ b/desktop/modules/deckit/README.md @@ -0,0 +1,36 @@ +# deckit + +One settings page, under Desktop, for deck-it (the tablet dashboard, its own +repo): whether it starts at login, and its `~/.config/deck-it/config.toml`. + +The config file is a sparse override. deck-it merges it over its shipped +`config.toml` key by key, so this page writes only what differs, and an +emptied field unsets the key and brings the default back. The defaults come +from `deck-it defaults` (JSON), run once when the page first loads, so they +are never copied here; deck-it must be on PATH (`~/bin/deck-it`, a link to +the repo's launcher). The draft rules are the settings window's, through +sbbuilder's `Store` and `Toml.js`, which gained plain decimals for the display +scale and lists of numbers for the workspaces. + +Start at login is not part of the draft: like the Autostart page, it edits +hypr-theme's `autostart.lua` at once, through `Autostart.js`. On re-enables a +commented-out `deck-it` line or adds `deck-it wifi --wait` before the closing +`end)`; off comments out every enabled one. Any `hl.exec_cmd` line whose +program is `deck-it` counts, so a hand-written `deck-it watch-usb` shows as on. + +Launchers are desktop ids (`[launch] apps`), added from the installed apps +the way the Autostart page picks one, minus terminal apps. Up and Remove edit +the list; the order is the button order on the tablet. + +deck-it reads its config once at start, so a save applies on Restart +deck-it, which runs `deck-it stop` and then the login command. + +While the page is open it polls `deck-it status` (JSON: server, display, +waiting, tablet, extend) every 2s and shows one line with a dot: green when +the server runs with a tablet tunnelled (and the display streams, if enabled), +yellow while starting or waiting for the tablet, red when stopped. After a +Restart it reports "Restarted" once that state is green, or what it saw if +it is not back within 30s; a `wifi --wait` with no tablet in reach ends there. + +Check: `node desktop/modules/sbbuilder/test_toml.js`; the deck-it side is +tested in its repo. -- cgit v1.2.3