tui

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, opts Options) error

Run launches the TUI.

Types

type Model

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

func NewModel

func NewModel(ctx context.Context, be backend.Backend, warn string, autoRefresh time.Duration) Model

NewModel creates a new TUI model.

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

func (Model) View

func (m Model) View() string

type Options

type Options struct {
	Backend      string
	APIKey       string
	LanListen    string
	LanBroadcast string
	AutoRefresh  time.Duration
	Debug        bool
}

Options configures the TUI.

type ScenesModel

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

ScenesModel renders the scenes modal.

func NewScenesModel

func NewScenesModel() ScenesModel

NewScenesModel creates a new scenes model.

func (*ScenesModel) SetScenes

func (m *ScenesModel) SetScenes(scenes []*models.Scene, locations []*models.Location)

SetScenes updates the scenes list.

func (ScenesModel) Update

func (m ScenesModel) Update(msg tea.Msg) (ScenesModel, tea.Cmd)

Update handles key events.

func (ScenesModel) View

func (m ScenesModel) View() string

View renders the modal.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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