D.A.B.Tv0.0.17 Tutorial API DABT Tools ↗ GitHub ↗

tui.config.set

tui.config.set KEY VALUE

Stores a setting and writes the config file immediately.

Parameters

  • KEY: setting name. Any key is accepted; see the module intro for the ones the framework reads.
  • VALUE: the value. Must not contain a newline.

Returns: 1 when the config directory cannot be created, else 0.

Notes

  • Does not apply the change to the running app. Framework keys read at start (theme, defaults.off, input.*, notify.*) take effect on the next start or after tui.config.apply; confirm.quit is read at quit time and takes effect at once.
  • Rewrites the whole file on every call. Don’t call it from a timer or tick function.

Example

tui.config.set confirm.quit 1

See also: tui.config.get, tui.config.unset