theme

package
v0.22.152 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package theme — color palette + lipgloss style factory shared across every clawtool TUI surface (dashboard, orchestrator, future split-pane views). Catppuccin-ish dark default, adaptive to light terminals via lipgloss.AdaptiveColor.

Operators who want a different palette set CLAWTOOL_THEME=light or wire a custom Theme via WithTheme(). The dispatch surfaces all pull styles through the package-level Default() — swapping the pointer at boot is enough to retheme every pane.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Theme

type Theme struct {
	// Surfaces
	Background    lipgloss.Style // root canvas
	PaneBorder    lipgloss.Style // inactive pane chrome
	PaneFocused   lipgloss.Style // focused pane chrome (accent border)
	PaneTitle     lipgloss.Style // header line inside a pane
	PaneSubtitle  lipgloss.Style // muted second-line under title
	StatusBar     lipgloss.Style // footer container
	HeaderBar     lipgloss.Style // top banner container
	HeaderTitle   lipgloss.Style // app name in the banner
	HeaderVersion lipgloss.Style // version pill

	// Status pills (rendered with bg fill so they stand out)
	StatusActive    lipgloss.Style
	StatusPending   lipgloss.Style
	StatusDone      lipgloss.Style
	StatusFailed    lipgloss.Style
	StatusCancelled lipgloss.Style

	// Content
	Body       lipgloss.Style // default text
	Dim        lipgloss.Style // de-emphasised metadata
	Accent     lipgloss.Style // primary highlight
	AccentSoft lipgloss.Style // secondary highlight
	Success    lipgloss.Style
	Warning    lipgloss.Style
	Error      lipgloss.Style

	// Selection / focus
	SelectedRow   lipgloss.Style
	UnselectedRow lipgloss.Style

	// Stream pane
	StreamLine    lipgloss.Style
	StreamCaret   lipgloss.Style // ">" prefix on each frame line
	StreamElapsed lipgloss.Style // (timestamp / duration tag)

	// Help bar (key-binding hints)
	HelpKey  lipgloss.Style
	HelpDesc lipgloss.Style
	HelpSep  lipgloss.Style
}

Theme is a single rendered style set. Built once per TUI boot.

func Default

func Default() *Theme

Default returns the singleton theme. Idempotent.

func (*Theme) StatusPill

func (t *Theme) StatusPill(status string) lipgloss.Style

StatusPill returns the pre-styled pill for a BIAM-style status label (pending / active / done / failed / cancelled / expired). Unknown statuses fall through to Dim.

Jump to

Keyboard shortcuts

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