ui

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultKeyMap = keyMap{
	Quit:    key.NewBinding(key.WithKeys("q", "ctrl+c"), key.WithHelp("q", "quit")),
	Refresh: key.NewBinding(key.WithKeys("r"), key.WithHelp("r", "refresh")),
	Play:    key.NewBinding(key.WithKeys("enter", " "), key.WithHelp("enter", "play")),
	Delete:  key.NewBinding(key.WithKeys("d"), key.WithHelp("d", "delete")),
	Switch:  key.NewBinding(key.WithKeys("tab"), key.WithHelp("tab", "switch focus")),
	Mode1:   key.NewBinding(key.WithKeys("1"), key.WithHelp("1", "subscriptions")),
	Mode2:   key.NewBinding(key.WithKeys("2"), key.WithHelp("2", "history")),
	Mode3:   key.NewBinding(key.WithKeys("3"), key.WithHelp("3", "playlists")),
	Mode4:   key.NewBinding(key.WithKeys("4"), key.WithHelp("4", "channels")),
	// contains filtered or unexported fields
}

Functions

func SetProgram

func SetProgram(pr *tea.Program)

Types

type ListItem

type ListItem interface {
	Title() string
	Description() string
	FilterValue() string
	ThumbnailPath() string
}

can either hold video / channel / playlist

type Model

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

func NewRootModel

func NewRootModel(cfg *config.Config, client *rpc.Client, st store.Store, scr scraper.YouTubeSearcher, pl player.Player, rend renderer.ImageRenderer) *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() tea.View

Jump to

Keyboard shortcuts

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