No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
nnra6864 59ef3131e6 chore: Dependencies come from the ktisigonos organization
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 01:23:03 +01:00
.gitignore chore: Zig's caches and fetched packages are ignored 2026-11-10 16:09:48 +01:00
adapter.zig refactor: Code, error messages and READMEs no longer cite design numbers 2026-11-09 20:17:19 +01:00
build.zig feat: TOML files are set by path, generated and blocked through the new kosm_toml adapter 2026-11-08 09:33:29 +01:00
build.zig.zon chore: Dependencies come from the ktisigonos organization 2026-11-11 01:23:03 +01:00
Parser.zig refactor: Code, error messages and READMEs no longer cite design numbers 2026-11-09 20:17:19 +01:00
README.md refactor: Code, error messages and READMEs no longer cite design numbers 2026-11-09 20:17:19 +01:00
root.zig refactor: Code, error messages and READMEs no longer cite design numbers 2026-11-09 20:17:19 +01:00

kosm_toml

TOML for kosm: the toml adapter reads and writes .toml files, such as alacritty's config and vicinae's themes. Apps use it through output.edit, output.generate and output.block; it knows no app.

  • Paths: every way TOML nests a key reaches the same path. [colors.primary] with background = ..., colors.primary.background = ... and colors = { primary = { background = ... } } are all colors.primary.background, and a table spelled in several places is one table. A key holding a dot is a quoted segment: "dim.foreground".
  • Arrays of tables: [[keyboard.bindings]] headers are one list, reached through selection.elements; a [keyboard.bindings.x] header below one belongs to its last element, as TOML says.
  • Values: strings are written as basic strings ("..."), colors and joined values as strings too, #rrggbb by default. A float always keeps a . or an exponent (13.0), since 13 would be read back as an integer; inf and nan are written as TOML spells them. Booleans are only true/false, so format.boolean must stay .true_false. Lists and tables set by edit are written inline ([1, 2], { x = 10 }).
  • Whole files: generate writes a table's own values first, then its tables as [sections] and its lists of tables as [[arrays of tables]].
  • Reading: the parser follows TOML 1.0 and reads TOML 1.1's inline tables across lines. Anything TOML rejects (a key defined twice, a table header repeated, an unquoted yes) is an error naming the line, and nothing is written.
  • Blocks: # kosm:begin <id> comments.