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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user