Documentation
¶
Index ¶
- type DetailColors
- type SidebarColors
- type StatusBarColors
- type StatusColors
- type StatusLineColors
- type TableColors
- type Theme
- func (t *Theme) DetailBorderStyle() lipgloss.Style
- func (t *Theme) DetailLabelStyle() lipgloss.Style
- func (t *Theme) DetailTabActiveStyle() lipgloss.Style
- func (t *Theme) DetailTabInactiveStyle() lipgloss.Style
- func (t *Theme) DetailValueStyle() lipgloss.Style
- func (t *Theme) SidebarCategoryStyle() lipgloss.Style
- func (t *Theme) SidebarSelectedStyle() lipgloss.Style
- func (t *Theme) SidebarStyle() lipgloss.Style
- func (t *Theme) SidebarUnfocusedSelectedStyle() lipgloss.Style
- func (t *Theme) StatusBarClusterStyle() lipgloss.Style
- func (t *Theme) StatusBarContextStyle() lipgloss.Style
- func (t *Theme) StatusBarNamespaceStyle() lipgloss.Style
- func (t *Theme) StatusBarStyle() lipgloss.Style
- func (t *Theme) StatusErrorStyle() lipgloss.Style
- func (t *Theme) StatusLineStyle() lipgloss.Style
- func (t *Theme) StatusPendingStyle() lipgloss.Style
- func (t *Theme) StatusRunningStyle() lipgloss.Style
- func (t *Theme) StatusUnknownStyle() lipgloss.Style
- func (t *Theme) TableAlternatingRowStyle() lipgloss.Style
- func (t *Theme) TableHeaderStyle() lipgloss.Style
- func (t *Theme) TableRowStyle() lipgloss.Style
- func (t *Theme) TableSelectedRowStyle() lipgloss.Style
- func (t *Theme) TableUnfocusedSelectedRowStyle() lipgloss.Style
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DetailColors ¶
type DetailColors struct {
BorderColor string `yaml:"border_color"`
LabelFg string `yaml:"label_fg"`
ValueFg string `yaml:"value_fg"`
TabActiveBg string `yaml:"tab_active_bg"`
TabActiveFg string `yaml:"tab_active_fg"`
TabInactiveFg string `yaml:"tab_inactive_fg"`
}
DetailColors defines colors for the detail panel.
type SidebarColors ¶
type SidebarColors struct {
Background string `yaml:"background"`
Foreground string `yaml:"foreground"`
SelectedBg string `yaml:"selected_bg"`
SelectedFg string `yaml:"selected_fg"`
UnfocusedSelectedBg string `yaml:"unfocused_selected_bg"`
UnfocusedSelectedFg string `yaml:"unfocused_selected_fg"`
CategoryFg string `yaml:"category_fg"`
}
SidebarColors defines colors for the sidebar panel.
type StatusBarColors ¶
type StatusBarColors struct {
Background string `yaml:"background"`
Foreground string `yaml:"foreground"`
ClusterFg string `yaml:"cluster_fg"`
NamespaceFg string `yaml:"namespace_fg"`
ContextFg string `yaml:"context_fg"`
}
StatusBarColors defines colors for the top status bar.
type StatusColors ¶
type StatusColors struct {
Running string `yaml:"running"`
Pending string `yaml:"pending"`
Error string `yaml:"error"`
Unknown string `yaml:"unknown"`
}
StatusColors defines colors for resource status indicators.
type StatusLineColors ¶
type StatusLineColors struct {
Background string `yaml:"background"`
Foreground string `yaml:"foreground"`
}
StatusLineColors defines colors for the bottom hints bar.
type TableColors ¶
type TableColors struct {
HeaderBg string `yaml:"header_bg"`
HeaderFg string `yaml:"header_fg"`
RowFg string `yaml:"row_fg"`
SelectedRowBg string `yaml:"selected_row_bg"`
SelectedRowFg string `yaml:"selected_row_fg"`
UnfocusedSelectedRowBg string `yaml:"unfocused_selected_row_bg"`
UnfocusedSelectedRowFg string `yaml:"unfocused_selected_row_fg"`
AlternatingBg string `yaml:"alternating_bg"`
}
TableColors defines colors for the resource table.
type Theme ¶
type Theme struct {
Sidebar SidebarColors `yaml:"sidebar"`
Table TableColors `yaml:"table"`
Detail DetailColors `yaml:"detail"`
StatusBar StatusBarColors `yaml:"status_bar"`
StatusLine StatusLineColors `yaml:"status_line"`
Status StatusColors `yaml:"status"`
}
Theme defines colors for all UI elements in km8.
func DefaultTheme ¶
func DefaultTheme() *Theme
DefaultTheme returns a sensible dark theme with Catppuccin-inspired colors.
func LoadTheme ¶
LoadTheme reads a theme.yaml from the given path and merges it with the default theme. Fields not present in the YAML file retain their default values. If path is empty or the file does not exist, the default theme is returned without error.
func (*Theme) DetailBorderStyle ¶
DetailBorderStyle returns the style for the detail panel border.
func (*Theme) DetailLabelStyle ¶
DetailLabelStyle returns the style for labels in the detail panel.
func (*Theme) DetailTabActiveStyle ¶
DetailTabActiveStyle returns the style for the active tab.
func (*Theme) DetailTabInactiveStyle ¶
DetailTabInactiveStyle returns the style for inactive tabs.
func (*Theme) DetailValueStyle ¶
DetailValueStyle returns the style for values in the detail panel.
func (*Theme) SidebarCategoryStyle ¶
SidebarCategoryStyle returns the style for sidebar category headers.
func (*Theme) SidebarSelectedStyle ¶
SidebarSelectedStyle returns the style for the selected sidebar item while the sidebar panel has focus — bg highlight + bold, the classic "you're driving this row" cursor look.
func (*Theme) SidebarStyle ¶
SidebarStyle returns the base style for the sidebar panel.
func (*Theme) SidebarUnfocusedSelectedStyle ¶ added in v1.4.0
SidebarUnfocusedSelectedStyle returns the style for the currently-active resource when the sidebar isn't focused — softer bg than the focused cursor plus bold, so the panel still reads as having a "remembered" selection without competing visually with the focused panel.
func (*Theme) StatusBarClusterStyle ¶
StatusBarClusterStyle returns the style for the cluster name in the status bar.
func (*Theme) StatusBarContextStyle ¶
StatusBarContextStyle returns the style for the context in the status bar.
func (*Theme) StatusBarNamespaceStyle ¶
StatusBarNamespaceStyle returns the style for the namespace in the status bar.
func (*Theme) StatusBarStyle ¶
StatusBarStyle returns the base style for the status bar.
func (*Theme) StatusErrorStyle ¶
StatusErrorStyle returns the style for error/failed status.
func (*Theme) StatusLineStyle ¶
StatusLineStyle returns the style for the bottom hints bar.
func (*Theme) StatusPendingStyle ¶
StatusPendingStyle returns the style for pending/warning status.
func (*Theme) StatusRunningStyle ¶
StatusRunningStyle returns the style for running/ready status.
func (*Theme) StatusUnknownStyle ¶
StatusUnknownStyle returns the style for unknown status.
func (*Theme) TableAlternatingRowStyle ¶
TableAlternatingRowStyle returns the style for alternating table rows.
func (*Theme) TableHeaderStyle ¶
TableHeaderStyle returns the style for table column headers.
func (*Theme) TableRowStyle ¶
TableRowStyle returns the style for a normal table row.
func (*Theme) TableSelectedRowStyle ¶
TableSelectedRowStyle returns the style for the table cursor row while the table panel has focus — bg highlight + bold.
func (*Theme) TableUnfocusedSelectedRowStyle ¶ added in v1.4.0
TableUnfocusedSelectedRowStyle returns the style for the table cursor row when the table isn't focused — softer bg than focused + bold, matching SidebarUnfocusedSelectedStyle.