1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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.
|