Documentation
¶
Index ¶
Constants ¶
View Source
const ( SourceDefault = "default" SourceLocal = "local" SourceRemote = "remote" )
Theme source constants.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AvailableTheme ¶
type AvailableTheme struct {
Key string // config key (filename stem, e.g. "catppuccin-mocha")
Name string // display name from TOML "name" field, or filename stem
Source string // SourceDefault, SourceLocal, or SourceRemote
Theme Theme // pre-loaded theme
RawTOML []byte // original TOML content (set for remote themes, used to save locally on select)
}
AvailableTheme represents a discovered theme that can be selected.
func FetchRemoteThemes ¶
func FetchRemoteThemes(localKeys map[string]bool) []AvailableTheme
FetchRemoteThemes fetches theme files from the GitHub repository. localKeys contains keys of themes already available locally; those are skipped. Returns nil on any network or parse error
func ListAvailable ¶
func ListAvailable() []AvailableTheme
ListAvailable returns all available themes: the hardcoded default plus any TOML files found in ~/.config/mdc/themes/.
type Theme ¶
type Theme struct {
// Panel
PanelBorder lipgloss.Style
PanelBorderActive lipgloss.Style
PanelHeader lipgloss.Style
PanelHeaderActive lipgloss.Style
// File list
FileNormal lipgloss.Style
FileDir lipgloss.Style
FileExec lipgloss.Style
FileSymlink lipgloss.Style
FileCursor lipgloss.Style
FileCursorDir lipgloss.Style
FileSelected lipgloss.Style
// Status bar and menu bar
StatusBar lipgloss.Style
MenuBar lipgloss.Style
FKeyHint lipgloss.Style
FKeyLabel lipgloss.Style
// Command line
CmdLine lipgloss.Style
}
Theme holds all styles used by the application.
func LoadByName ¶
LoadByName loads a theme by name from ~/.config/mdc/themes/<name>.toml.
func LoadFromFile ¶
LoadFromFile loads a theme from a TOML file, falling back to Default() for missing values.
Click to show internal directories.
Click to hide internal directories.