settings

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package settings is the dashboard's configuration view: it shows where the active config came from and what it resolved to, offers a manual reload, and watches the file (on the shared refresh heartbeat) so edits hot-apply without restarting the TUI. Theme and credentials still need a restart — the theme applies once per process and auth requires a new client.

Index

Constants

View Source
const ID core.SectionID = "settings"

ID is the section identifier.

Variables

This section is empty.

Functions

func New

func New(ctx *core.ProgramContext) core.Section

New builds the settings section.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the settings section: an interactive menu over the config keys. Enum rows cycle in place and apply live — a theme change re-skins the dashboard on the spot — while numbers and lists edit through a small form. Every change validates, saves atomically, and hot-reloads. The literal config.toml stays one keypress away (e) for the structured tables the menu doesn't model (sections, lenses, keys).

func (*Model) CapturesInput

func (m *Model) CapturesInput() bool

CapturesInput reports whether an editor or picker owns the keyboard.

func (*Model) HelpBindings

func (m *Model) HelpBindings() []key.Binding

HelpBindings lists the section's contextual bindings.

func (*Model) ID

func (m *Model) ID() core.SectionID

ID returns the settings section's identifier.

func (*Model) Init

func (m *Model) Init(ctx *core.ProgramContext) tea.Cmd

Init records the config file's current mtime as the auto-reload baseline.

func (*Model) Title

func (m *Model) Title() string

Title returns the tab-bar label.

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (core.Section, tea.Cmd)

Update handles the menu, both edit modes, the reload key, the heartbeat poll, and the reload echo.

func (*Model) View

func (m *Model) View() string

View renders the path header, the status line, the hint row, and the body — the menu (with any inline value form), or the raw editor when open.

Jump to

Keyboard shortcuts

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