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

Add support for a new 'border' property on widgets

Sets whether or not the widget should be drawn with a border (and by
extension a title).

If 'true', the border is drawn. If 'false', no
border is drawn. Defaults. to 'true'. Optional.
This commit is contained in:
Chris Cummer
2019-07-10 22:30:36 -07:00
parent 60895c84a2
commit c2e240014d
2 changed files with 11 additions and 1 deletions

View File

@@ -47,7 +47,8 @@ type Common struct {
PositionSettings `help:"Defines where in the grid this modules widget will be displayed."`
Sigils
Enabled bool `help:"Determines whether or not this module is executed and if its data displayed onscreen." values:"true, false"`
Bordered bool `help:"Whether or not the module should be displayed with a border." values:"true, false" optional:"true" default:"true"`
Enabled bool `help:"Whether or not this module is executed and if its data displayed onscreen." values:"true, false" optional:"true" default:"false"`
RefreshInterval int `help:"How often, in seconds, this module will update its data." values:"A positive integer, 0..n." optional:"true"`
Title string `help:"The title string to show when displaying this module" optional:"true"`
Config *config.Config
@@ -80,6 +81,7 @@ func NewCommonSettingsFromModule(name, defaultTitle string, moduleConfig *config
PositionSettings: NewPositionSettingsFromYAML(name, moduleConfig),
Bordered: moduleConfig.UBool("border", true),
Enabled: moduleConfig.UBool("enabled", false),
RefreshInterval: moduleConfig.UInt("refreshInterval", 300),
Title: moduleConfig.UString("title", defaultTitle),