ui

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioSource added in v0.2.0

type AudioSource interface {
	Latest() *audio.FrequencyData
}

AudioSource provides real-time FFT data for the visualizer. Implemented by audio.PipeReader.

type LibrespotInactiveMsg added in v0.2.0

type LibrespotInactiveMsg struct{}

LibrespotInactiveMsg is sent (via p.Send) when librespot reports that the device became inactive, indicating playback moved to another device.

type Model

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

func NewModel

func NewModel(client *spotify.Client, opts ...ModelOption) 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 ModelOption

type ModelOption func(*Model)

ModelOption configures optional Model features.

func WithAudioSource added in v0.2.0

func WithAudioSource(src AudioSource) ModelOption

WithAudioSource sets the audio source for real-time visualizer data and enables the audio-reactive visualizers.

func WithLibrespotInactive added in v0.2.0

func WithLibrespotInactive(ch <-chan struct{}) ModelOption

WithLibrespotInactive provides a channel that signals when librespot reports its device became inactive (playback moved to another device).

func WithVimMode

func WithVimMode() ModelOption

WithVimMode enables vim-style keybindings (h/l for back/select, ctrl+d/u half-page, etc.).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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