# sbbuilder Two settings pages, under SB Builder, for sb-builder's two configs: - **Desktop**: the GUI's `$XDG_CONFIG_HOME/sb-builder/config.toml`, edited in place. sb-builder watches the file, so a save applies to a running GUI (if the file existed when the GUI started; otherwise File, Reload config once). VM control is a switch: sb-builder spells "no VM control" as `domain = ""`, and an emptied field means the default instead. - **Build VM**: the helper's `/etc/sb-builder/config.toml`, read with `ssh sbb-remote config-get` and written with `config-set`, the draft on stdin. The helper validates it and keeps the old file as `.bak`; the page never writes it over ssh by hand. `` and the ssh options come from the desktop config as saved. With the VM down the page is read-only until Reload gets an answer. One ssh runs at a time, and a save first re-reads the file, refusing if it changed on the VM meanwhile. Both follow the settings window's draft rules (`desktop/README.md`). A field is typed after its default: lists are words split on spaces (a list entry holding a space is a `ponytail:` ceiling: edit the file), numbers are range-checked. An emptied manifest URL holds Save back rather than unsetting the key, which would remove the row being typed in. The helper takes a `[manifests]` table whole, in place of its default one, so a file without one lists the helper's default rows, and the first add, remove or edit writes them all first: adding one row once silently dropped the default neovim manifest. The desktop defaults are copied from sb-builder's `config.py`, a `ponytail:` ceiling in `Sbb.qml`; the VM ones come from the helper. `Toml.js` edits a line at a time so comments survive, as qtmaildir's `Ini.js` does: unset comments a key out with `#`, set reactivates it. It handles one-line values only and refuses to edit a value with anything but a comment after it, multi-line strings and arrays included, rather than write a duplicate key. Not recognised: CRLF line endings, `[ spaced ]` and `[[array]]` headers, 'literal' keys; neither file uses them. The fields are qtmaildir's `Setting` and `BoolSetting`, given a `store`. Check: `node desktop/modules/sbbuilder/test_toml.js`.