ui

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDuration

func FormatDuration(seconds float64) string

FormatDuration formats seconds into a human-readable string like "2h 30m" or "45m".

func FormatTimestamp

func FormatTimestamp(seconds float64) string

FormatTimestamp formats seconds as H:MM:SS or M:SS.

func RunProgram added in v0.8.2

func RunProgram(p *tea.Program) (tea.Model, error)

RunProgram runs the program until it quits, and returns its final model. It quits the program when the process gets SIGHUP, which is the close of its terminal. Without that, the process ends at the signal, and the app does not do its cleanup after the program. Bubble Tea quits the program at SIGTERM.

Types

type Styles

type Styles struct {
	Title     lipgloss.Style
	Subtitle  lipgloss.Style
	Muted     lipgloss.Style
	Selected  lipgloss.Style
	Error     lipgloss.Style
	Accent    lipgloss.Style
	Info      lipgloss.Style
	Border    lipgloss.Style
	PlayerBar lipgloss.Style
	StatusBar lipgloss.Style
	Caption   lipgloss.Style
}

Styles holds all lipgloss styles derived from the active theme.

func DefaultStyles

func DefaultStyles() Styles

DefaultStyles returns styles using the default Everforest Dark palette.

func NewStyles

func NewStyles(theme ThemeConfig) Styles

NewStyles builds a Styles set from a ThemeConfig, allowing user overrides.

type ThemeConfig added in v0.6.0

type ThemeConfig struct {
	Background string `toml:"background"`
	Foreground string `toml:"foreground"`
	Accent     string `toml:"accent"`
	Error      string `toml:"error"`
	Muted      string `toml:"muted"`
	Selected   string `toml:"selected"`
	Border     string `toml:"border"`
	Warning    string `toml:"warning"`
	Info       string `toml:"info"`
}

ThemeConfig holds the theme colors of the [theme] config section.

func DefaultTheme added in v0.6.0

func DefaultTheme() ThemeConfig

DefaultTheme returns the default Everforest Dark palette.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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