Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDuration ¶
FormatDuration formats seconds into a human-readable string like "2h 30m" or "45m".
func FormatTimestamp ¶
FormatTimestamp formats seconds as H:MM:SS or M:SS.
func RunProgram ¶ added in v0.8.2
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"`
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.