Skip to content

Configuration file

~/.tg.json is a user-home state file. Theme Manager reads a missing or malformed file as defaults and preserves unknown keys when it writes known state. A file that exists but cannot be read or parsed (permission error, invalid JSON, not a JSON object) is never written over: commands that would save state fail with Refusing to overwrite … until the file is fixed or removed, so a transient failure cannot drop activeTheme or favorites.

FieldDefault / shapeOwner
customThemesstring[]Theme discovery during generation.
lastGeneratedThemetheme ID or nullLast theme generated by the generation flow.
favoriteSeedColors{ color, variant }[]Favorites flow; legacy string favorites migrate on read.
lastUsedSeedColorhex or nullSeed generation.
lastUsedVariantvariant or nullSeed generation.
activeThemetheme ID or nullUser-selected theme family; read by tman apply, which saves a configured fallback only when it is null.

Writes use the shared same-directory temporary-file-plus-rename helper. This gives atomic replacement for the ordinary state-file path, but does not create backups or offer a global rollback.