tui

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: GPL-3.0 Imports: 21 Imported by: 0

README

TUI Package

This package implements the Terminal User Interface for the EPOS CLI using tview.

Design Pattern: Central Coordinator

The package is organized around the App struct (app.go), which acts as a central coordinator. Unlike a traditional MVC where components might talk to each other directly, here components like EnvList and DetailsPanel primarily interact with the App to trigger state changes, navigation, or background tasks.

Why? This keeps individual components decoupled and ensures that global concerns—like which page is visible, what is currently focused, and UI thread safety—are handled in one place.

Core Mechanisms

Focus & Navigation Stack

Focus management is the most complex part of a multi-page TUI. We use a manual stack (focusStack) to handle this:

  • Pushing Focus: When opening a modal or form, the current primitive is pushed onto the stack.
  • Restoring Focus: ResetToHome pops the stack to return the user exactly where they were (e.g., a specific item in a list) after a workflow completes or is cancelled.
State Synchronization

The TUI does not rely on local state for environment data. Instead:

  • A background ticker in App periodically triggers Refresh() on components.
  • Components pull the latest data directly from the db package.
  • This ensures the UI stays consistent even if the environment state changes via external CLI commands or background processes.
Thread-Safe I/O Capture

Long-running operations (Deploy, Update, etc.) execute in separate goroutines to keep the UI responsive.

  • Output Capture: The OutputWriter redirects stdout/stderr from core commands to a buffer.
  • UI Updates: All background tasks must use a.tview.QueueUpdateDraw when updating UI components to ensure thread safety during the tview event loop.

The footer displays the current section prefix (e.g., "[Docker Environments]") coupled with context-specific keyboard shortcuts.

  • Design Principle: Each ScreenKey determines both the footer section text (via GetFooterText) and the available keys (via getFooterHints). This ensures consistency and prevents mismatches.
  • Usage: Call UpdateFooter(contextKey) to set the footer based on the current screen/context. UpdateFooterCustom is used only for dynamic/custom sections or keys not tied to a standard context.
  • Why?: Keeps footer content tightly coupled to the UI state, making it easy to maintain and extend without manual synchronization.

Standardized Workflow Patterns

Most operations follow a strict "Trigger -> Confirmation/Form -> Progress -> Result" flow.

  • Confirmations: ShowConfirmation provides a consistent visual language for destructive actions.
  • Progress Runner: RunBackgroundTask encapsulates the boiler-plate of starting a goroutine, switching to the OperationProgress view, and showing the final success/error overlay.

Styling

Consistency is enforced through components.go (factory functions) and theme.go (color tokens). Avoid direct primitive initialization or hardcoded colors; use the NewStyled* factories to ensure the application maintains a cohesive look and feel.

Documentation

Overview

Package tui provides a terminal user interface for managing EPOS environments.

Index

Constants

View Source
const (
	StateRunning = "running"
	StateSuccess = "success"
	StateError   = "error"
)

Variables

View Source
var DefaultTheme = &Theme{
	Primary:          tcell.NewRGBColor(90, 180, 105),
	OnPrimary:        tcell.NewRGBColor(0, 0, 0),
	Secondary:        tcell.NewRGBColor(229, 161, 14),
	OnSecondary:      tcell.NewRGBColor(0, 0, 0),
	Error:            tcell.NewRGBColor(200, 60, 60),
	OnError:          tcell.NewRGBColor(255, 255, 255),
	Destructive:      tcell.NewRGBColor(200, 60, 60),
	OnDestructive:    tcell.NewRGBColor(255, 255, 255),
	Success:          tcell.NewRGBColor(90, 180, 105),
	OnSuccess:        tcell.NewRGBColor(0, 0, 0),
	Background:       tcell.NewRGBColor(20, 20, 20),
	OnBackground:     tcell.NewRGBColor(20, 20, 20),
	Surface:          tcell.NewRGBColor(60, 72, 65),
	OnSurface:        tcell.NewRGBColor(255, 255, 255),
	Muted:            tcell.NewRGBColor(60, 72, 65),
	OnMuted:          tcell.NewRGBColor(20, 20, 20),
	HeaderBackground: tcell.NewRGBColor(40, 48, 43),
}

DefaultTheme is the default color scheme.

View Source
var FooterTexts = map[ScreenKey]FooterText{
	DockerKey:        DockerFooter,
	K8sKey:           K8sFooter,
	DetailsDockerKey: DetailsFooter,
	DetailsK8sKey:    DetailsFooter,
	FilePickerKey:    FilePickerFooter,
	HomeKey:          HomeFooter,
	PopulateFormKey:  PopulateFooter,
	DeleteConfirmKey: DeleteFooter,
	CleanConfirmKey:  CleanFooter,
	HelpKey:          HelpFooter,
	UpdateFormKey:    UpdateFooter,
	DeployFormKey:    NewFooter,
}
View Source
var KeyHints = map[ScreenKey][]KeyHint{
	"docker": {
		{"tab: switch", "tab: switch between docker and k8s environments", true, "Navigation"},
		{"↑↓: nav", "↑↓: navigate through docker environments", true, "Navigation"},
		{"n: new", "n: create a new docker environment", true, "Environment"},
		{"d: del", "d: delete the selected docker environment", true, "Environment"},
		{"c: clean", "c: clean the selected docker environment", true, "Environment"},
		{"u: update", "u: update the selected docker environment", true, "Environment"},
		{"p: populate", "p: populate the selected docker environment", true, "Environment"},
		{"enter: details", "enter: view details of the selected docker environment", true, "Navigation"},
		{"?: help", "?: show help for current context", true, "Generic"},
		{"q: quit", "q: quit the application", true, "Generic"},
	},
	"k8s": {
		{"tab: switch", "tab: switch between docker and k8s environments", true, "Navigation"},
		{"↑↓: nav", "↑↓: navigate through k8s environments", true, "Navigation"},
		{"n: new", "n: create a new k8s environment", true, "Environment"},
		{"d: del", "d: delete the selected k8s environment", true, "Environment"},
		{"c: clean", "c: clean the selected k8s environment", true, "Environment"},
		{"u: update", "u: update the selected k8s environment", true, "Environment"},
		{"p: populate", "p: populate the selected k8s environment", true, "Environment"},
		{"enter: details", "enter: view details of the selected k8s environment", true, "Navigation"},
		{"?: help", "?: show help for current context", true, "Generic"},
		{"q: quit", "q: quit the application", true, "Generic"},
	},
	"details-docker": {
		{"esc: back", "esc: go back to docker environments list", true, "Navigation"},
		{"tab: cycle", "tab: cycle through available actions", true, "Navigation"},
		{"d: del", "d: delete this docker environment", true, "Environment"},
		{"c: clean", "c: clean this docker environment", true, "Environment"},
		{"u: update", "u: update this docker environment", true, "Environment"},
		{"p: populate", "p: populate this docker environment", true, "Environment"},
		{"g: gui", "g: open gui in browser", true, "Browser"},
		{"G: copy gui", "G: copy gui url to clipboard", false, "Browser"},
		{"b: backoffice", "b: open backoffice in browser", true, "Browser"},
		{"B: copy backoffice", "B: copy backoffice url to clipboard", false, "Browser"},
		{"a: api", "a: open api docs in browser", true, "Browser"},
		{"A: copy api", "A: copy api url to clipboard", false, "Browser"},
		{"e: directory", "e: open directory in browser", true, "Browser"},
		{"E: copy directory", "E: copy directory url to clipboard", false, "Browser"},
		{"enter: open file", "enter: open the selected ingested file/directory/url", false, "Browser"},
		{"y: copy file", "y: copy the selected ingested file path to clipboard", false, "Browser"},
		{"?: help", "?: show help for current context", true, "Generic"},
		{"q: quit", "q: quit the application", false, "Generic"},
	},
	"details-k8s": {
		{"esc: back", "esc: go back to k8s environments list", true, "Navigation"},
		{"tab: cycle", "tab: cycle through available actions", true, "Navigation"},
		{"d: del", "d: delete this k8s environment", true, "Environment"},
		{"c: clean", "c: clean this k8s environment", true, "Environment"},
		{"u: update", "u: update this k8s environment", true, "Environment"},
		{"p: populate", "p: populate this k8s environment", true, "Environment"},
		{"g: gui", "g: open gui in browser", true, "Browser"},
		{"G: copy gui", "G: copy gui url to clipboard", false, "Browser"},
		{"b: backoffice", "b: open backoffice in browser", true, "Browser"},
		{"B: copy backoffice", "B: copy backoffice url to clipboard", false, "Browser"},
		{"a: api", "a: open api docs in browser", true, "Browser"},
		{"A: copy api", "A: copy api url to clipboard", false, "Browser"},
		{"e: directory", "e: open directory in browser", true, "Browser"},
		{"E: copy directory", "E: copy directory url to clipboard", false, "Browser"},
		{"enter: open file", "enter: open the selected ingested file/directory/url", false, "Browser"},
		{"y: copy file", "y: copy the selected file path to clipboard", false, "Browser"},
		{"?: help", "?: show help for current context", true, "Generic"},
		{"q: quit", "q: quit the application", false, "Generic"},
	},
	"delete-confirm": {
		{"←→: switch", "", true, "Generic"},
		{"enter: confirm", "", true, "Generic"},
		{"esc: cancel", "", true, "Generic"},
	},
	"deleting": {
		{"please wait...", "", true, "Generic"},
	},
	"delete-complete": {
		{"esc/enter: back", "", true, "Generic"},
	},
	"clean-confirm": {
		{"←→: switch", "", true, "Generic"},
		{"enter: confirm", "", true, "Generic"},
		{"esc: cancel", "", true, "Generic"},
	},
	"cleaning": {
		{"please wait...", "", true, "Generic"},
	},
	"clean-complete": {
		{"esc/enter: back", "", true, "Generic"},
	},
	"update-form": {
		{"tab: next", "", true, "Generic"},
		{"S-tab: prev", "", true, "Generic"},
		{"enter: submit", "", true, "Generic"},
		{"esc: cancel", "", true, "Generic"},
	},
	"updating": {
		{"please wait...", "", true, "Generic"},
	},
	"update-complete": {
		{"esc/enter: back", "", true, "Generic"},
	},
	"populate-confirm": {
		{"←→: switch", "", true, "Generic"},
		{"enter: confirm", "", true, "Generic"},
		{"esc: cancel", "", true, "Generic"},
	},
	"populating": {
		{"please wait...", "", true, "Generic"},
	},
	"populate-complete": {
		{"esc/enter: back", "", true, "Generic"},
	},
	"populate-form": {
		{"tab: next", "", true, "Generic"},
		{"S-tab: prev", "", true, "Generic"},
		{"enter: submit", "", true, "Generic"},
		{"esc: cancel", "", true, "Generic"},
	},
	"file-picker": {
		{"↑↓←→: nav", "↑↓←→: navigate through files and directories", true, "Generic"},
		{"/: search", "/: enter search mode for files", true, "Generic"},
		{"space: mark", "space: mark/unmark files for selection", true, "Generic"},
		{"n/N: next/prev match", "n/N: jump to next/previous search match", true, "Generic"},
		{"enter: submit", "enter: submit selected files", true, "Generic"},
		{"esc: cancel", "esc: cancel file selection", true, "Generic"},
	},
	"deploy-form": {
		{"tab: next", "", true, "Generic"},
		{"S-tab: prev", "", true, "Generic"},
		{"enter: submit", "", true, "Generic"},
		{"esc: cancel", "", true, "Generic"},
	},
	"deploying": {
		{"esc: back (won't stop deployment)", "", true, "Generic"},
	},
	"deploy-complete": {
		{"esc/enter: back", "", true, "Generic"},
	},
	"help": {
		{"↑↓: nav", "↑↓: navigate through help content", true, "Generic"},
		{"esc: close", "esc: close the help screen", true, "Generic"},
	},
}

KeyHints maps screen names to their available keyboard shortcuts. Used by updateFooter() and help screen.

Functions

func ApplyButtonStyle

func ApplyButtonStyle(btn *tview.Button)

ApplyButtonStyle applies standard button styles.

func ApplyDropDownStyle

func ApplyDropDownStyle(dd *tview.DropDown)

ApplyDropDownStyle applies theme colors to a dropdown.

func CenterPrimitive

func CenterPrimitive(p tview.Primitive, width, height int) tview.Primitive

CenterPrimitive wraps a primitive in a flex layout that centers it. Use width/height as proportions (1 = minimal, higher = more space).

func CenterPrimitiveFixed

func CenterPrimitiveFixed(p tview.Primitive, width, height int) tview.Primitive

CenterPrimitiveFixed wraps a primitive in a flex layout that centers it with fixed dimensions.

func InitStyles

func InitStyles()

InitStyles sets up global tview styles and borders.

func NewStyledButton

func NewStyledButton(label string, selected func()) *tview.Button

NewStyledButton creates a button with theme colors.

func NewStyledForm

func NewStyledForm() *tview.Form

NewStyledForm creates a form with theme colors.

func NewStyledInactiveButton

func NewStyledInactiveButton(label string, selected func()) *tview.Button

NewStyledInactiveButton creates a button with surface colors (used for "Browse Files" etc).

func NewStyledInputField

func NewStyledInputField(label, value string) *tview.InputField

NewStyledInputField creates an input field with theme colors.

func NewStyledList

func NewStyledList() *tview.List

NewStyledList creates a list with theme colors.

func NewStyledTextView

func NewStyledTextView() *tview.TextView

NewStyledTextView creates a text view with theme colors.

func Run

func Run() error

Run starts the TUI application.

Types

type App

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

App manages the global TUI state, coordinator for components and navigation.

func (*App) FlashMessage

func (a *App) FlashMessage(message string, duration time.Duration)

FlashMessage shows a temporary message in the footer for the specified duration.

func (*App) PopFocus

func (a *App) PopFocus() tview.Primitive

PopFocus restores the last saved focus from the stack. Returns the restored primitive or nil if stack was empty.

func (*App) PushFocus

func (a *App) PushFocus()

PushFocus saves the current focus to the stack.

func (*App) Quit

func (a *App) Quit()

Quit stops the application.

func (*App) ResetToHome

func (a *App) ResetToHome(opts ResetOptions)

ResetToHome cleans up pages and returns to the home screen. Handles page removal, refreshing lists, and restoring focus.

func (*App) RunBackgroundTask

func (a *App) RunBackgroundTask(opts TaskOptions)

RunBackgroundTask runs an operation with a standard progress UI. It starts a new OperationProgress screen and executes the provided task in a goroutine. Handles updating the UI upon completion (success or error).

func (*App) ShowConfirmation

func (a *App) ShowConfirmation(opts ConfirmationOptions)

ShowConfirmation displays a standardized confirmation modal.

func (*App) ShowError

func (a *App) ShowError(message string)

ShowError displays an error modal with a message. Press OK or ESC to dismiss.

func (*App) ShowModalForm

func (a *App) ShowModalForm(opts ModalFormOptions)

ShowModalForm displays a standardized modal form with fields and buttons.

func (*App) UpdateFooter

func (a *App) UpdateFooter(contextKey ScreenKey)

UpdateFooter updates the footer section text and shortcut keys.

func (*App) UpdateFooterCustom

func (a *App) UpdateFooterCustom(section string, keys []string)

UpdateFooterCustom updates the footer with custom keys (not from context).

type ConfirmationOptions

type ConfirmationOptions struct {
	PageName           string
	Title              string
	Message            string
	ConfirmLabel       string
	CancelLabel        string
	OnConfirm          func()
	OnCancel           func()
	Destructive        bool // Use Red border
	ConfirmDestructive bool // Use Red confirm button
	Secondary          bool // Use Yellow border (ignored if Destructive)
	InputCapture       func(leftBtn, rightBtn *tview.Button) func(*tcell.EventKey) *tcell.EventKey
}

ConfirmationOptions defines settings for the standardized confirmation modal.

type DetailRow

type DetailRow struct {
	Label       string
	Value       string
	IncludeOpen bool
}

DetailRow represents a row in the details grid.

type DetailsPanel

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

DetailsPanel manages the right-side information and action panel.

func NewDetailsPanel

func NewDetailsPanel(app *App) *DetailsPanel

NewDetailsPanel creates a new DetailsPanel component.

func (*DetailsPanel) Clear

func (dp *DetailsPanel) Clear()

Clear shows the placeholder text in the details panel.

func (*DetailsPanel) CycleFocus

func (dp *DetailsPanel) CycleFocus()

CycleFocus cycles focus between buttons, grid, and list in the details view.

func (*DetailsPanel) CycleFocusBackward

func (dp *DetailsPanel) CycleFocusBackward()

CycleFocusBackward cycles focus backward between buttons, grid, and list in the details view.

func (*DetailsPanel) GetCurrentDetailsName

func (dp *DetailsPanel) GetCurrentDetailsName() string

GetCurrentDetailsName returns the current details environment name.

func (*DetailsPanel) GetCurrentDetailsType

func (dp *DetailsPanel) GetCurrentDetailsType() string

GetCurrentDetailsType returns the current details environment type.

func (*DetailsPanel) GetFlex

func (dp *DetailsPanel) GetFlex() *tview.Flex

GetFlex returns the main flex for this component.

func (*DetailsPanel) IsShown

func (dp *DetailsPanel) IsShown() bool

IsShown returns true if the details panel is currently showing details.

func (*DetailsPanel) RefreshFiles

func (dp *DetailsPanel) RefreshFiles()

RefreshFiles refreshes the ingested files list if details are currently shown.

func (*DetailsPanel) SetupInput

func (dp *DetailsPanel) SetupInput()

SetupInput configures key handlers for the details panel.

func (*DetailsPanel) Update

func (dp *DetailsPanel) Update(name, envType string, focus bool)

Update fetches and displays environment details in the panel.

type EnvList

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

EnvList manages the left-side navigation for environment selection.

func NewEnvList

func NewEnvList(app *App) *EnvList

NewEnvList creates a new EnvList component.

func (*EnvList) FocusActiveList

func (el *EnvList) FocusActiveList()

FocusActiveList sets the focus to the currently active environment list (Docker or K8s). If the list is empty, it focuses the "Create New" button instead.

func (*EnvList) GetFlex

func (el *EnvList) GetFlex() *tview.Flex

GetFlex returns the main flex for this component.

func (*EnvList) GetSelected

func (el *EnvList) GetSelected() (string, bool)

GetSelected returns the currently selected environment name and whether it's Docker.

func (*EnvList) IsDockerActive

func (el *EnvList) IsDockerActive() bool

IsDockerActive returns true if the Docker list is currently active.

func (*EnvList) Refresh

func (el *EnvList) Refresh()

Refresh updates the lists from the database, preserving current focus/selection.

func (*EnvList) SetInitialFocus

func (el *EnvList) SetInitialFocus()

SetInitialFocus sets the focus to the default list or button.

func (*EnvList) SetupInput

func (el *EnvList) SetupInput()

SetupInput configures keyboard and focus handlers.

func (*EnvList) SwitchFocus

func (el *EnvList) SwitchFocus()

SwitchFocus toggles focus between Docker and K8s lists.

type FilePicker

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

FilePicker is a component to select files or directories.

type FocusButton

type FocusButton string

FocusButton represents the button to focus after UI rebuild.

const (
	FocusButtonBrowse FocusButton = "browse"
	FocusButtonFiles  FocusButton = "files"
	FocusButtonDirs   FocusButton = "dirs"
)

type FooterText

type FooterText string

FooterText represents a footer text string.

const (
	DockerFooter     FooterText = "[Docker Environments]"
	K8sFooter        FooterText = "[K8s Environments]"
	DetailsFooter    FooterText = "[Environment Details]"
	FilePickerFooter FooterText = "[File Picker]"
	HomeFooter       FooterText = "[Home]"
	PopulateFooter   FooterText = "[Populate Environment]"
	DeleteFooter     FooterText = "[Delete Environment]"
	CleanFooter      FooterText = "[Clean Environment]"
	HelpFooter       FooterText = "[Help]"
	UpdateFooter     FooterText = "[Update Environment]"
	NewFooter        FooterText = "[New Environment]"
)

func GetFooterText

func GetFooterText(key ScreenKey) FooterText

type FormButton

type FormButton struct {
	Label        string
	SelectedFunc func()
}

FormButton represents a button in a modal form.

type FormField

type FormField struct {
	Type                string // "input", "checkbox", "dropdown"
	Label               string
	Value               string
	Options             []string          // For dropdowns
	InputChangedFunc    func(string)      // For inputs
	CheckboxChangedFunc func(bool)        // For checkboxes
	SelectedFunc        func(string, int) // For dropdowns
}

FormField represents a field in a modal form.

type KeyHint

type KeyHint struct {
	Text         string
	LongText     string
	ShowInFooter bool
	Group        string
}

KeyHint represents a keyboard shortcut hint.

type ModalFormOptions

type ModalFormOptions struct {
	PageName string
	Title    string
	Fields   []FormField
	Buttons  []FormButton
	Width    int
	Height   int
	OnCancel func()
}

ModalFormOptions defines settings for modal forms.

type OperationProgress

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

OperationProgress manages the UI for operation progress screens.

func NewOperationProgress

func NewOperationProgress(app *App, operation, envName string) *OperationProgress

NewOperationProgress creates a new OperationProgress instance.

func (*OperationProgress) Complete

func (op *OperationProgress) Complete(success bool, errorMsg string)

Complete marks the operation as finished and shows the completion overlay.

func (*OperationProgress) Start

func (op *OperationProgress) Start()

Start begins the progress display and ticker.

type OutputWriter

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

OutputWriter captures command output and routes it to a TUI TextView.

func (*OutputWriter) ClearBuffer

func (w *OutputWriter) ClearBuffer()

ClearBuffer clears the output buffer.

func (*OutputWriter) ClearView

func (w *OutputWriter) ClearView()

ClearView disconnects the writer from the current view.

func (*OutputWriter) GetBuffer

func (w *OutputWriter) GetBuffer() string

GetBuffer returns the current buffer content.

func (*OutputWriter) SetView

func (w *OutputWriter) SetView(app *tview.Application, view *tview.TextView)

SetView connects the writer to a TextView for output display.

func (*OutputWriter) Write

func (w *OutputWriter) Write(p []byte) (n int, err error)

Write implements io.Writer.

type ResetOptions

type ResetOptions struct {
	PageNames     []string // Pages to remove
	ClearDetails  bool     // Clear details panel (e.g., after delete)
	RefreshFiles  bool     // Refresh files list (e.g., after populate)
	RestoreFocus  bool     // Restore focus from stack
	ForceEnvFocus bool     // Explicitly focus environment list
}

ResetOptions configures the return to home screen.

type ScreenKey

type ScreenKey string

ScreenKey represents a key for identifying UI screens.

const (
	DetailsDockerKey ScreenKey = "details-docker"
	DetailsK8sKey    ScreenKey = "details-k8s"
	DockerKey        ScreenKey = "docker"
	K8sKey           ScreenKey = "k8s"
	FilePickerKey    ScreenKey = "file-picker"
	HomeKey          ScreenKey = "home"
	PopulateFormKey  ScreenKey = "populate-form"
	DeleteConfirmKey ScreenKey = "delete-confirm"
	CleanConfirmKey  ScreenKey = "clean-confirm"
	HelpKey          ScreenKey = "help"
	DeployFormKey    ScreenKey = "deploy-form"
	UpdateFormKey    ScreenKey = "update-form"
)

type TaskOptions

type TaskOptions struct {
	Operation    string
	EnvName      string
	IsDocker     bool
	Task         func() (string, error) // Returns success message or error
	OnSuccess    func()
	ClearDetails bool
}

TaskOptions defines settings for background operations with progress UI.

type Theme

type Theme struct {
	Primary          tcell.Color
	OnPrimary        tcell.Color
	Secondary        tcell.Color
	OnSecondary      tcell.Color
	Error            tcell.Color
	OnError          tcell.Color
	Destructive      tcell.Color
	OnDestructive    tcell.Color
	Success          tcell.Color
	OnSuccess        tcell.Color
	Background       tcell.Color
	OnBackground     tcell.Color
	Surface          tcell.Color
	OnSurface        tcell.Color
	Muted            tcell.Color
	OnMuted          tcell.Color
	HeaderBackground tcell.Color
}

Theme defines the color scheme for the TUI.

func (*Theme) DestructiveTag

func (t *Theme) DestructiveTag(attrs string) string

func (*Theme) Hex

func (t *Theme) Hex(color tcell.Color) string

Hex returns the hex string for a color.

func (*Theme) MutedTag

func (t *Theme) MutedTag(attrs string) string

func (*Theme) PrimaryTag

func (t *Theme) PrimaryTag(attrs string) string

func (*Theme) SecondaryTag

func (t *Theme) SecondaryTag(attrs string) string

func (*Theme) Tag

func (t *Theme) Tag(color tcell.Color, attrs string) string

Tag returns a tview color tag.

Jump to

Keyboard shortcuts

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