tui

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package tui implements the terminal user interface for vimyt.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App is the root Bubble Tea model.

func New

func New(plStore *model.PlaylistStore) App

New creates a new App model, restoring previous session state.

func (App) Init

func (a App) Init() tea.Cmd

func (App) Update

func (a App) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (App) View

func (a App) View() string

type Theme added in v1.0.1

type Theme struct {
	// Cursor / selection background
	CursorBg string `json:"cursor_bg"`
	// Accent color for focused borders, labels, key hints
	Accent string `json:"accent"`
	// Secondary/dimmed text (metadata, descriptions, counts)
	Dimmed string `json:"dimmed"`
	// Muted text (filters, time display, status bar)
	Muted string `json:"muted"`
	// Unfocused panel border and label color
	Unfocused string `json:"unfocused"`
	// Disabled/off state text
	Disabled string `json:"disabled"`
	// Currently playing track indicator
	Playing string `json:"playing"`
	// Enabled/on state text
	Enabled string `json:"enabled"`
	// Now-playing title (track name)
	NowPlayingTitle string `json:"now_playing_title"`
	// Now-playing artist name
	NowPlayingArtist string `json:"now_playing_artist"`
	// Artist name in search/history results
	ArtistText string `json:"artist_text"`
	// Paused state indicator
	Paused string `json:"paused"`
	// Favorite heart icon
	Favorite string `json:"favorite"`
	// Radio mode badge
	Radio string `json:"radio"`
	// Create new playlist action
	Create string `json:"create"`
	// Progress bar filled portion
	BarFilled string `json:"bar_filled"`
	// Progress bar unfilled portion
	BarEmpty string `json:"bar_empty"`
}

Theme holds all customizable colors for the TUI.

func DefaultTheme added in v1.0.1

func DefaultTheme() Theme

DefaultTheme returns the default color theme.

func ThemeFromMap added in v1.0.1

func ThemeFromMap(m map[string]string) Theme

ThemeFromMap creates a theme by applying overrides to the default.

func (Theme) ToMap added in v1.0.1

func (t Theme) ToMap() map[string]string

ToMap converts the theme to a map for session persistence.

Jump to

Keyboard shortcuts

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