Documentation
¶
Overview ¶
internal/theme/loader.go
internal/theme/manager.go
internal/theme/theme.go
Index ¶
- func SetCurrentTheme(theme *Theme)
- type CommandFunc
- type Manager
- func (m *Manager) Current() *Theme
- func (m *Manager) GetTheme(name string) (*Theme, bool)
- func (m *Manager) ListThemes() []string
- func (m *Manager) LoadThemesFromDir() error
- func (m *Manager) SaveCurrentThemeAsDefault() error
- func (m *Manager) SaveThemeToFile(themeName, fileName string) error
- func (m *Manager) SetTheme(name string) error
- func (m *Manager) WatchForChanges() error
- type Theme
- type ThemeAPI
- type TomlStyleDef
- type TomlTheme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetCurrentTheme ¶
func SetCurrentTheme(theme *Theme)
Types ¶
type CommandFunc ¶
CommandFunc defines the signature for theme commands
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager holds loaded themes and manages the active theme.
func (*Manager) ListThemes ¶
ListThemes returns the names of all loaded themes.
func (*Manager) LoadThemesFromDir ¶
LoadThemesFromDir scans the themes directory and loads .toml files.
func (*Manager) SaveCurrentThemeAsDefault ¶
SaveCurrentThemeAsDefault saves the current theme as theme.toml (public version)
func (*Manager) SaveThemeToFile ¶
SaveThemeToFile saves a theme to a TOML file in the themes directory
func (*Manager) WatchForChanges ¶
WatchForChanges sets up filesystem monitoring for theme directory changes This would allow real-time reloading of themes when files change
type Theme ¶
Theme struct definition (remains the same)
var CurrentTheme *Theme
CurrentTheme, GetCurrentTheme, SetCurrentTheme (remain the same)
var DevComfortDark Theme // Define variable for this theme
func GetCurrentTheme ¶
func GetCurrentTheme() *Theme
func LoadThemeFromFile ¶
LoadThemeFromFile parses a TOML file and converts it to a Theme object
type ThemeAPI ¶
type ThemeAPI interface {
GetTheme() *Theme
SetTheme(name string) error
ListThemes() []string
SetStatusMessage(format string, args ...interface{})
}
ThemeAPI interface for theme operations
type TomlStyleDef ¶
type TomlStyleDef struct {
Fg *string `toml:"fg"` // Use pointers to detect missing values
Bg *string `toml:"bg"`
Bold *bool `toml:"bold"`
Italic *bool `toml:"italic"`
Underline *bool `toml:"underline"`
Reverse *bool `toml:"reverse"`
}
TomlStyleDef represents a single style definition in the TOML file