config

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path() (string, error)

Types

type Config

type Config struct {
	Default   string                 `yaml:"default"`
	Cortexes  map[string]CortexEntry `yaml:"cortexes"`
	TrashDays int                    `yaml:"trash_days,omitempty"` // 0 means use default (30)
	UI        *UIConfig              `yaml:"ui,omitempty"`
}

func Load

func Load() (*Config, error)

func (*Config) Save

func (c *Config) Save() error

func (*Config) SetTheme added in v0.4.1

func (c *Config) SetTheme(theme string)

SetTheme records a theme preference, allocating the UI block if needed. An empty string clears the preference (falls back to auto).

func (*Config) Theme added in v0.4.1

func (c *Config) Theme() string

Theme returns the configured UI theme, defaulting to "auto" when UI is nil or Theme is unset. This is the single source of truth for what "no explicit theme configured" means.

type CortexEntry

type CortexEntry struct {
	Path string `yaml:"path"`
	ID   string `yaml:"id,omitempty"` // ULID, used to disambiguate same-named cortexes
}

type UIConfig added in v0.4.1

type UIConfig struct {
	// Theme is the TUI color scheme: "auto", "dark", or "light".
	// Empty is treated as "auto" (detect terminal background).
	Theme string `yaml:"theme,omitempty"`
}

UIConfig holds user-level TUI preferences. Stored as a pointer on Config so it can be omitted from the YAML output entirely when the user has never touched any of these settings — a fresh config stays visually identical to what older Noema binaries produced.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL