Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category struct {
Name string `yaml:"name,omitempty"`
Color string `yaml:"color,omitempty"`
Priority int `yaml:"priority,omitempty"`
Goal Goal `yaml:"goal,omitempty"`
Deprecated bool `yaml:"deprecated"`
}
A Category as defined in a config file. It combines the style definition with the name and priority definition.
type ColorschemeType ¶
type ColorschemeType = int
A ColorschemeType can either be light or dark.
const ( Dark ColorschemeType Light )
type Config ¶
type Config struct {
Stylesheet Stylesheet `yaml:"stylesheet"`
Categories []Category `yaml:"categories"`
}
Config is the configuration data as present in a config file at '${DAYPLAN_HOME}/config.yaml'.
func Default ¶
func Default(colorschemeType ColorschemeType) Config
Default returns the default colorscheme for the given type (light or dark).
func ParseConfigAugmentDefaults ¶
func ParseConfigAugmentDefaults(defaultTheme ColorschemeType, yamlData []byte) (Config, error)
ParseConfigAugmentDefaults parses the configuration specified in YAML-formatted data and uses it to augment a given default configuration.
type FontStyle ¶
type FontStyle struct {
Bold bool `yaml:"bold,omitempty"`
Italic bool `yaml:"italic,omitempty"`
Underlined bool `yaml:"underlined,omitempty"`
}
A FontStyle can be any combination of bold, italic, and underlined.
type Goal ¶
type Goal struct {
Workweek *WorkweekGoal `yaml:"workweek,omitempty"`
Ranged *[]RangedGoal `yaml:"ranged,omitempty"`
}
Goal is a time goal.
type RangedGoal ¶
type RangedGoal struct {
Start string `yaml:"start"`
End string `yaml:"end"`
Time string `yaml:"time"`
}
RangedGoal allows defining an expected duration over a period of time.
For format see time.ParseDuration. It probably wouldn't make sense to define negative values.
type Stylesheet ¶
type Stylesheet struct {
Normal Styling `yaml:"normal"`
NormalEmphasized Styling `yaml:"normal-emphasized"`
WeatherNormal Styling `yaml:"weather-normal"`
WeatherSunny Styling `yaml:"weather-sunny"`
WeatherRainy Styling `yaml:"weather-rainy"`
TimelineDay Styling `yaml:"timeline-day"`
TimelineNight Styling `yaml:"timeline-night"`
TimelineNow Styling `yaml:"timeline-now"`
Status Styling `yaml:"status"`
LogDefault Styling `yaml:"log-default"`
LogTitleBox Styling `yaml:"log-title-box"`
LogEntryTypeError Styling `yaml:"log-entry-type-error"`
LogEntryTypeWarn Styling `yaml:"log-entry-type-warn"`
LogEntryTypeInfo Styling `yaml:"log-entry-type-info"`
LogEntryTypeDebug Styling `yaml:"log-entry-type-debug"`
LogEntryTypeTrace Styling `yaml:"log-entry-type-trace"`
LogEntryLocation Styling `yaml:"log-entry-location"`
LogEntryTime Styling `yaml:"log-entry-time"`
Help Styling `yaml:"help"`
Editor Styling `yaml:"editor"`
SummaryDefault Styling `yaml:"summary-default"`
SummaryTitleBox Styling `yaml:"summary-title-box"`
CategoryFallback Styling `yaml:"category-fallback"`
}
A Stylesheet is the stylesheet contents defined in a config file.
type Styling ¶
A Styling is a styling as defined in a config file. It must contain fore- and background colors and can optionally specify font style (bold, italic, underlined).
type WorkweekGoal ¶
type WorkweekGoal struct {
Monday string `yaml:"monday"`
Tuesday string `yaml:"tuesday"`
Wednesday string `yaml:"wednesday"`
Thursday string `yaml:"thursday"`
Friday string `yaml:"friday"`
Saturday string `yaml:"saturday"`
Sunday string `yaml:"sunday"`
}
WorkweekGoal allows defining an expected duration per weekday.
For format see time.ParseDuration. It probably wouldn't make sense to define negative values.