ui

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App is the root TUI application.

func NewApp

func NewApp(providers []awspkg.Provider, theme Theme, region string, rebuildFn func(string) []awspkg.Provider) *App

NewApp constructs the App with the given resource providers, color theme, current AWS region, and a factory function for rebuilding providers when the region changes.

func (*App) Run

func (a *App) Run() error

Run starts the tview event loop.

type Theme

type Theme struct {
	FocusColor     tcell.Color // widget border + list selection background
	SelectionText  tcell.Color // text on selected list item
	HighlightTag   string      // tview tag for selected object row
	HeaderTag      string      // tview tag for column headers / KV keys
	ActiveTabTag   string      // tview tag for the active tab label
	InactiveTabTag string      // tview tag for inactive tab labels
	LinkTag        string      // tview tag for cross-resource links (with underline)
}

Theme controls the visual color scheme of the TUI.

func DetectTheme

func DetectTheme() Theme

DetectTheme infers the best color scheme from environment variables.

  • TERM_PROGRAM=WarpTerminal → green (higher contrast in Warp)
  • COLORFGBG background > 6 → blue (light terminal)
  • default → aqua/cyan

func LoadConfigTheme

func LoadConfigTheme(base Theme) *Theme

LoadConfigTheme reads the config file and returns a Theme with overrides applied. Returns nil if no config file exists or the file has no theme overrides.

Jump to

Keyboard shortcuts

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