Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadMenuFile ¶
ReadMenuFile reads a menu file and returns bytes
func ReadThemeFile ¶
Types ¶
type Menu ¶
Menu holds a map of menu items
type MenuItem ¶
type MenuItem struct {
Name string // Name of the menu item
Command string // Command to run
Children map[string]*MenuItem // Submenu items
}
MenuItem holds all the menu item data
type ThemeConfig ¶
type ThemeConfig struct {
BaseForeground string `json:"base_foreground,omitempty"`
BaseBackground string `json:"base_background,omitempty"`
BaseBold bool `json:"base_bold,omitempty"`
TitleForeground string `json:"title_foreground,omitempty"`
TitleBackground string `json:"title_background,omitempty"`
TitleBold bool `json:"title_bold,omitempty"`
TitleBorder string `json:"title_separator,omitempty"`
OptionForeground string `json:"option_foreground,omitempty"`
OptionBackground string `json:"option_background,omitempty"`
OptionBold bool `json:"option_bold,omitempty"`
SelectedOptionForeground string `json:"selected_foreground,omitempty"`
SelectedOptionBackground string `json:"selected_background,omitempty"`
SelectedOptionBold bool `json:"selected_bold,omitempty"`
SelectSelectorForeground string `json:"selector_foreground,omitempty"`
SelectSelectorBackground string `json:"selector_background,omitempty"`
SelectSelectorBold bool `json:"selector_bold,omitempty"`
SelectSelectorString string `json:"selector_string,omitempty"`
}
Theme holds all the styles for the UI
func DefaultThemeConfig ¶
func DefaultThemeConfig() ThemeConfig
DefaultTheme returns the default theme
func NewThemeConfig ¶
func NewThemeConfig(themeJSON string) (ThemeConfig, error)
func (*ThemeConfig) CreateTheme ¶
func (tc *ThemeConfig) CreateTheme() (*huh.Theme, error)
NewTheme takes a custom JSON string and returns a new theme with the customizations applied
Click to show internal directories.
Click to hide internal directories.