tui

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(clientID string, refreshRate time.Duration) error

Run starts the TUI application

Types

type App

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

App holds the TUI application state

func NewApp

func NewApp(clientID string, refreshRate time.Duration) (*App, error)

NewApp creates a new TUI application

type Model

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

Model is the main TUI model

func NewModel

func NewModel(app *App) Model

NewModel creates a new TUI model

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model

func (Model) Update

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

Update handles messages

func (Model) View

func (m Model) View() string

View renders the UI

type Panel

type Panel int

Panel represents which panel is focused

const (
	PanelNowPlaying Panel = iota
	PanelQueue
	PanelDevices
	PanelHistory
)

type SearchType added in v0.2.0

type SearchType int

SearchType represents the type of search to perform

const (
	SearchAll SearchType = iota
	SearchTracks
	SearchAlbums
	SearchArtists
	SearchPlaylists
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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