Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Registry = map[string]NewThemeable{
"OneCommander": newOneCommander,
"PythonIDLE": newPythonIDLE,
"Spyder": newSpyder,
"WindowsTerminal": newWindowsTerminal,
}
Registry of themeable program creators
Functions ¶
func LoadConfig ¶
func LoadConfig() (map[string]ThemeConfig, error)
LoadConfig loads the config file and returns the ThemeConfig If the config file does not exist, it will return an error If the config file is not valid, it will return an error
Types ¶
type NewThemeable ¶
type NewThemeable func(ThemeConfig) Themeable
type OneCommander ¶
type OneCommander struct {
ThemeConfig // theme config
}
OneCommander is a program that can be themed
func (OneCommander) SetTheme ¶
func (programTheme OneCommander) SetTheme(theme string) error
OneCommander.SetTheme sets the theme for OneCommander Given a theme name, it will set the theme If the theme name is not valid, it will return an error
type PythonIDLE ¶
type PythonIDLE struct {
ThemeConfig // theme config
}
PythonIDLE is a program that can be themed
func (PythonIDLE) SetTheme ¶
func (programTheme PythonIDLE) SetTheme(theme string) error
PythonIDLE.SetTheme sets the theme for PythonIDLE Given a theme name, it will set the theme If the theme name is not valid, it will return an error
type Spyder ¶
type Spyder struct {
ThemeConfig // theme config
}
Spyder is a program that can be themed
type ThemeConfig ¶
type ThemeConfig struct { Light string `json:"light"` // prefered theme name for light mode Dark string `json:"dark"` // prefered theme name for dark mode ConfigPath string `json:"configpath"` // config file path }
light and dark theme names, and config file path
func (ThemeConfig) GetTheme ¶
func (programTheme ThemeConfig) GetTheme(theme string) string
GetTheme returns the theme name based on the theme flag If the theme flag is not valid, it will return the default theme
type WindowsTerminal ¶
type WindowsTerminal struct {
ThemeConfig // theme config
}
WindowsTerminal is a program that can be themed
func (WindowsTerminal) SetTheme ¶
func (programTheme WindowsTerminal) SetTheme(theme string) error
WindowsTerminal.SetTheme sets the theme for WindowsTerminal Given a theme name, it will set the theme If the theme name is not valid, it will return an error