Select
Synopsis
Section titled “Synopsis”tman select [options]There are no positional arguments.
Options
Section titled “Options”| Flag | Behavior |
|---|---|
-t, --theme <name> | Required for non-interactive named selection; must be in configured generated themes. |
-d, --dark | Use the dark generated mode. |
-l, --light | Use the light generated mode. |
--last-dark | Read and apply the last saved dark theme. |
--last-light | Read and apply the last saved light theme. |
--last-dark has precedence over --last-light, then a supplied theme. A named theme with no mode prompts for light or dark. With no source flags, the CLI previews/selects an available theme interactively and then prompts for a mode. --dark and --light together are an error.
Reads, writes, and processes
Section titled “Reads, writes, and processes”Selection reads the generated sources for the named theme and each application-capable adapter’s path contract. It writes live destinations, runs adapter-owned best-effort reload hooks, and saves the last used theme for the mode in ~/.tg.json when at least one adapter succeeds.
Adapters run sequentially. A missing generated source, an environment skip, or an adapter failure can produce partial success; successful targets persist and later targets still run. If every adapter throws, last-used state is not recorded and the command reports failure.
Examples
Section titled “Examples”tman select --theme material --darktman select --theme material --lighttman select --last-darkUnknown themes, absent mode-specific last-used state, no configured themes, incompatible mode flags, and unexpected selection errors exit nonzero. A best-effort pipeline that applies at least one target completes normally while logging individual failures.