tui

package
v0.0.0-...-c144a73 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Themes = ColorThemes{
	RosePine: Theme{
		Primary:    "#eb6f92",
		Secondary:  "#31748f",
		Background: "#26233a",
		Foreground: "#9ccfd8",
		Success:    "#f6c177",
		Warning:    "#ebbcba",
		Accent:     "#c4a7e7",
	},
	RosePineMoon: Theme{
		Primary:    "#eb6f92",
		Secondary:  "#3e8fb0",
		Background: "#393552",
		Foreground: "#9ccfd8",
		Success:    "#f6c177",
		Warning:    "#ea9a97",
		Accent:     "#c4a7e7",
	},
	RosePineDawn: Theme{
		Primary:    "#ea9d34",
		Accent:     "#b4637a",
		Background: "#56949f",
		Foreground: "#286983",
		Success:    "#d7827e",
		Secondary:  "#907aa9",
		Warning:    "#f2e9e1",
	},
	Additional: make(map[string]Theme),
	Selected:   SelectedTheme{Theme: "RosePine"},
}

Functions

func ClearTerminalScreen

func ClearTerminalScreen()

func ThemeGoTask

func ThemeGoTask(theme Theme) *huh.Theme

ThemeGoTask Creates a theme for a huh form to be used when rendering the task creation form. The theme is based on the theme selected by the user.

Types

type ColorThemes

type ColorThemes struct {
	RosePine     Theme            `toml:"rose_pine"`
	RosePineMoon Theme            `toml:"rose_pine_moon"`
	RosePineDawn Theme            `toml:"rose_pine_dawn"`
	Additional   map[string]Theme `toml:"additional"`
	Selected     SelectedTheme    `toml:"selected"`
}

type SelectedTheme

type SelectedTheme struct {
	Theme string `toml:"theme"`
}

type Theme

type Theme struct {
	Primary    string `toml:"primary"`
	Secondary  string `toml:"secondary"`
	Background string `toml:"background"`
	Foreground string `toml:"foreground"`
	Success    string `toml:"success"`
	Warning    string `toml:"warning"`
	Accent     string `toml:"accent"`
}

func GetSelectedTheme

func GetSelectedTheme() Theme

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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