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

Add default titles, to mimic original behavior

Have the modules set their own titles
If no title is specified, use this title, rather than default to name
This commit is contained in:
Sean Smith
2019-04-30 23:29:18 -04:00
parent 3a96c303a8
commit 14abd422b2
53 changed files with 104 additions and 99 deletions

View File

@@ -61,7 +61,7 @@ type Common struct {
focusChar int
}
func NewCommonSettingsFromModule(name string, moduleConfig *config.Config, globalSettings *config.Config) *Common {
func NewCommonSettingsFromModule(name, defaultTitle string, moduleConfig *config.Config, globalSettings *config.Config) *Common {
colorsConfig, _ := globalSettings.Get("wtf.colors")
positionPath := "position"
sigilsPath := "wtf.sigils"
@@ -93,7 +93,7 @@ func NewCommonSettingsFromModule(name string, moduleConfig *config.Config, globa
Enabled: moduleConfig.UBool("enabled", false),
RefreshInterval: moduleConfig.UInt("refreshInterval", 300),
Title: moduleConfig.UString("title", name),
Title: moduleConfig.UString("title", defaultTitle),
Config: moduleConfig,
focusChar: moduleConfig.UInt("focusChar", -1),