Documentation
¶
Overview ¶
Package config loads nt's optional config file, $NT_DIR/config.toml. It is a deliberately tiny TOML subset — [section] headers and `key = value` lines with string / int / bool values — so nt keeps its zero-runtime-dependency, plain- text ethos (no TOML library). A missing or partial file is never an error; unset keys keep their zero value and callers fall back to built-in defaults.
Recognized keys (all optional):
[defaults] priority = "high" # default --pri for `nt add` source = "cli" # default --source agenda_days = 7 # default horizon for `nt agenda` editor = "nvim" # overrides $EDITOR for `nt edit` [web] port = 4321 # default `nt web` port host = "127.0.0.1" # default bind address [tui] theme = "auto" # auto | light | dark
Index ¶
Constants ¶
View Source
const FileName = "config.toml"
FileName is the config file's basename within $NT_DIR.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
DefaultPriority string // [defaults] priority
DefaultSource string // [defaults] source
AgendaDays int // [defaults] agenda_days
Editor string // [defaults] editor
WebPort int // [web] port
WebHost string // [web] host
WebDayBudget int // [web] day_budget_minutes — Today capacity bar budget (0 = default 360)
TUITheme string // [tui] theme (auto|light|dark)
}
Config is the parsed config. Zero values mean "unset" — callers OR them with their existing defaults.
Click to show internal directories.
Click to hide internal directories.