theme

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ColorClaude   = lipgloss.Color("#CC785C")
	ColorCodex    = lipgloss.Color("#FFFFFF")
	ColorGemini   = lipgloss.Color("#4285f4")
	ColorAmp      = lipgloss.Color("#ED4C3D")
	ColorOpencode = lipgloss.Color("#000000")
	ColorDroid    = lipgloss.Color("#EE6018")
	ColorCline    = lipgloss.Color("#101827")
	ColorCursor   = lipgloss.Color("#1B1812")
	ColorPi       = lipgloss.Color("#0e0e11")
)

Agent colors remain constant across themes for brand recognition.

View Source
var Icons = struct {
	// Status indicators
	Clean   string
	Dirty   string
	Running string
	Idle    string

	// Actions
	Add    string
	Delete string
	Edit   string
	Close  string

	// Navigation
	Cursor      string
	CursorEmpty string
	ArrowRight  string
	ArrowDown   string

	// Objects
	Project   string
	Workspace string
	Agent     string
	Terminal  string
	Folder    string
	File      string
	Git       string
	Home      string
	DirOpen   string
	DirClosed string

	// Spinner frames for loading animation
	Spinner []string
}{

	Clean:   "✓",
	Dirty:   "●",
	Running: "●",
	Idle:    "○",

	Add:    "+",
	Delete: "×",
	Edit:   "~",
	Close:  "×",

	Cursor:      ">",
	CursorEmpty: " ",
	ArrowRight:  "→",
	ArrowDown:   "↓",

	Project:   "□",
	Workspace: "├",
	Agent:     "◇",
	Terminal:  "$",
	Folder:    "/",
	File:      "·",
	Git:       "*",
	Home:      "~",
	DirOpen:   "▼",
	DirClosed: "▶",

	Spinner: []string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"},
}

Icons used throughout the application Uses Unicode characters with fallbacks for broad terminal support

Functions

func AgentColor

func AgentColor(agent string) color.Color

AgentColor returns the brand color for a registered agent, falling back to ColorPrimary for unknown agents. Membership is resolved via the canonical registry so the supported roster stays in sync with config and the chat tab.

func ColorBackground

func ColorBackground() color.Color

func ColorBorder

func ColorBorder() color.Color

func ColorBorderFocused

func ColorBorderFocused() color.Color

func ColorError

func ColorError() color.Color

func ColorForeground

func ColorForeground() color.Color

func ColorInfo

func ColorInfo() color.Color

func ColorMuted

func ColorMuted() color.Color

func ColorPrimary

func ColorPrimary() color.Color

func ColorSecondary

func ColorSecondary() color.Color

func ColorSelection

func ColorSelection() color.Color

func ColorSuccess

func ColorSuccess() color.Color

func ColorSurface0

func ColorSurface0() color.Color

func ColorSurface1

func ColorSurface1() color.Color

func ColorSurface2

func ColorSurface2() color.Color

func ColorWarning

func ColorWarning() color.Color

func HexColor

func HexColor(c color.Color) string

HexColor converts a color.Color into a #RRGGBB string.

func Init

func Init()

Init installs the default theme if no theme has been selected yet. The app calls this explicitly during construction (rather than relying on package init side effects); direct library/test use is still safe because currentTheme falls back lazily.

func SetCurrentTheme

func SetCurrentTheme(id ThemeID)

SetCurrentTheme atomically applies a new theme.

func SpinnerFrame

func SpinnerFrame(frame int) string

SpinnerFrame returns the spinner character for a given frame index

Types

type Styles

type Styles struct {
	// Layout - Pane borders and structure
	Pane lipgloss.Style

	// Text hierarchy
	Title    lipgloss.Style // App name, section headers
	Subtitle lipgloss.Style // Secondary headers
	Body     lipgloss.Style // Normal text
	Muted    lipgloss.Style // De-emphasized text
	Bold     lipgloss.Style // Emphasized text

	// Dashboard - Project tree
	ProjectHeader   lipgloss.Style
	WorkspaceRow    lipgloss.Style
	ActiveWorkspace lipgloss.Style
	SelectedRow     lipgloss.Style
	CreateButton    lipgloss.Style
	HomeRow         lipgloss.Style
	AddProjectRow   lipgloss.Style

	// Status badges
	StatusClean   lipgloss.Style
	StatusDirty   lipgloss.Style
	StatusPending lipgloss.Style
	StatusRunning lipgloss.Style

	// Git status file indicators
	StatusModified  lipgloss.Style
	StatusAdded     lipgloss.Style
	StatusDeleted   lipgloss.Style
	StatusRenamed   lipgloss.Style
	StatusUntracked lipgloss.Style

	// Center pane - Tabs
	Tab       lipgloss.Style
	ActiveTab lipgloss.Style
	TabBar    lipgloss.Style
	TabPlus   lipgloss.Style

	// Center pane - Agent indicators
	AgentTerm lipgloss.Style

	// Sidebar
	SidebarHeader lipgloss.Style
	SidebarRow    lipgloss.Style
	BranchName    lipgloss.Style
	FilePath      lipgloss.Style
	DirName       lipgloss.Style

	// Help bar
	Help          lipgloss.Style
	HelpKey       lipgloss.Style
	HelpDesc      lipgloss.Style
	HelpSeparator lipgloss.Style

	// Dialogs
	DialogBox     lipgloss.Style
	DialogTitle   lipgloss.Style
	DialogMessage lipgloss.Style
	DialogOption  lipgloss.Style
	DialogActive  lipgloss.Style

	// Feedback
	Error   lipgloss.Style
	Success lipgloss.Style
	Warning lipgloss.Style
	Info    lipgloss.Style

	// Toast notifications
	ToastSuccess lipgloss.Style
	ToastError   lipgloss.Style
	ToastWarning lipgloss.Style
	ToastInfo    lipgloss.Style
}

Styles contains all the application styles

func DefaultStyles

func DefaultStyles() Styles

DefaultStyles returns the default application styles using the current theme

type Theme

type Theme struct {
	ID     ThemeID
	Name   string
	Colors ThemeColors
}

Theme represents a complete color theme.

func AvailableThemes

func AvailableThemes() []Theme

AvailableThemes returns all predefined themes, grouped by family.

func GetCurrentTheme

func GetCurrentTheme() Theme

GetCurrentTheme returns the currently active theme.

func GetTheme

func GetTheme(id ThemeID) Theme

GetTheme returns a theme by ID, defaulting to Gruvbox.

type ThemeColors

type ThemeColors struct {
	// Base palette
	Background    color.Color
	Foreground    color.Color
	Muted         color.Color
	Border        color.Color
	BorderFocused color.Color

	// Semantic colors
	Primary   color.Color
	Secondary color.Color
	Success   color.Color
	Warning   color.Color
	Error     color.Color
	Info      color.Color

	// Surface colors for layering
	Surface0 color.Color
	Surface1 color.Color
	Surface2 color.Color

	// Selection/highlight
	Selection color.Color
}

ThemeColors defines all colors used by the application.

type ThemeID

type ThemeID string

ThemeID identifies a color theme.

const (
	// Dark themes
	ThemeTokyoNight ThemeID = "tokyo-night"
	ThemeDracula    ThemeID = "dracula"
	ThemeNord       ThemeID = "nord"
	ThemeCatppuccin ThemeID = "catppuccin"
	ThemeGruvbox    ThemeID = "gruvbox"
	ThemeSolarized  ThemeID = "solarized"
	ThemeMonokai    ThemeID = "monokai"
	ThemeRosePine   ThemeID = "rose-pine"
	ThemeOneDark    ThemeID = "one-dark"
	ThemeKanagawa   ThemeID = "kanagawa"
	ThemeEverforest ThemeID = "everforest"
	ThemeAyuDark    ThemeID = "ayu-dark"
	ThemeGitHubDark ThemeID = "github-dark"

	// Light themes
	ThemeSolarizedLight  ThemeID = "solarized-light"
	ThemeGitHubLight     ThemeID = "github-light"
	ThemeCatppuccinLatte ThemeID = "catppuccin-latte"
	ThemeOneLight        ThemeID = "one-light"
	ThemeGruvboxLight    ThemeID = "gruvbox-light"
	ThemeRosePineDawn    ThemeID = "rose-pine-dawn"
)

Jump to

Keyboard shortcuts

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