1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

WTF-665 Add time format setting for gCal module

Allows the user to specify either "12" or "24" to set whether or not to
display times in AM/PM format or 24-hour format.

Example:

      gcal:
        enabled: true
        timeFormat: "12"
        refreshInterval: 360

Fixes #665
This commit is contained in:
Chris Cummer
2019-10-01 21:34:52 -07:00
parent 301eddafd4
commit 7c2d6b4c42
5 changed files with 17 additions and 8 deletions

View File

@@ -24,10 +24,11 @@ type Settings struct {
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
settings := Settings{
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
color: ymlConfig.UString("color"),
font: ymlConfig.UString("font"),
hourFormat: ymlConfig.UString("hourFormat"),
hourFormat: ymlConfig.UString("hourFormat", "24"),
}
return &settings