Skip to content
Copied!
published on 2026-06-08

Schema Reference ​

Settings (v0.2.2)

The schema is written in TOML and is embedded into the binary at build time. To assemble a settings UI, schema authors only need to know what each field means and how the TOML is structured. For the exact list of types and default values, see the settings-schema crate (settings-schema/src/lib.rs).

Top level ​

FieldDescription
tabsArray of tab definitions (required)
icon_styleMaterial Symbols variant: "rounded" / "outlined" / "sharp"
theme"os" / "light" / "dark" — see Theming
langUI language — see Localization
lang_keyConfig key to read the parent app's language setting from when lang = "os"
background_color, etc.Light theme color overrides (CSS #rrggbb)
[dark]Dark theme color overrides
save_button"os" / "show" / "hide" — how the save UI is displayed
[ui_strings]Overrides for built-in UI strings — see Localization
content_width / content_heightLogical size of the content area (px)
[[constraints]]Named CEL constraints — see Validation

Tab ​

FieldDescription
idTab identifier
labelTab display name (localizable)
iconMaterial Symbol name (when an icon font is bundled)
content_width / content_heightPer-tab size override
fieldsFlat array of fields (mutually exclusive with section_map)
section_mapDynamic subsections — see SectionMap below

SectionMap ​

A mechanism for placing a group of subsections (sub-tabs) inside a tab, where the number of subsections grows or shrinks based on the contents of the config file.

Example with tab_style = "segmented" and allow_add_remove = false (fixed sections):

section_map: segmented / fixedsection_map: segmented / fixed

Example with tab_style = "underline" and allow_add_remove = true (variable sections):

section_map: underline / variablesection_map: underline / variable

FieldDescription
key_prefixTable name in the config file (e.g. "providers")
allow_add_removeWhether subsections can be added and removed
fieldsField definitions for each subsection
tab_style"underline" / "segmented"
max_widthMaximum width when tab_style = "segmented"

When allow_add_remove = false, the list of sub-tab keys is derived automatically from the contents of the config file. There is no need to enumerate the keys in the schema.

Field (common) ​

FieldDescription
keyConfig key (dot-separated). Not needed for separator
labelLabel (localizable)
type"string" / "bool" / "number"
widgetWidget kind — see Widget Reference
hint / sublabelHelper text (localizable)
hint_direct / hint_envHelper text for exclusive_radio
options / options_fromChoices (statically given, or dynamically derived from a section_map)
exclusiveConfiguration table for exclusive_radio
min / max / step / suffixFor numeric widgets
min_width / max_width / rowsLayout adjustments
is_directory / file_filter / file_extensionsFor file_path
key_label / value_labelFor key_value_map
validateValidation rules — see Validation
option_statesDisabling individual options — see Validation

Save modes (save_button) ​

ValueBehavior
"os"Auto-saves on macOS. Shows a save bar (OK / Cancel / Apply) on Windows / Linux
"show"Always shows the save bar
"hide"Always auto-saves

When the save bar is shown, it has three buttons from left to right: OK (save and close), Cancel (discard and close), and Apply (save and keep the window open). OK / Apply are disabled while there are validation errors.

External change detection ​

Settings watches the config file. If there are no unsaved edits, external changes are reflected on screen automatically. If there are unsaved edits, a conflict dialog appears with Reload (discard edits and reload) and Keep Editing (continue editing and ignore the external change).

Window size ​

When you switch tabs, the window is resized to match that tab's content_width / content_height (falling back to the top-level values when omitted). The height of the tab bar and save bar varies depending on whether icon is set in the schema and on the save_button setting.