diff --git a/cfg/common_settings.go b/cfg/common_settings.go index ce1be396..a78a3394 100644 --- a/cfg/common_settings.go +++ b/cfg/common_settings.go @@ -30,13 +30,6 @@ type Module struct { Type string } -// type Position struct { -// Height int -// Left int -// Top int -// Width int -// } - type Sigils struct { Checkbox struct { Checked string @@ -64,7 +57,6 @@ type Common struct { func NewCommonSettingsFromModule(name, defaultTitle string, moduleConfig *config.Config, globalSettings *config.Config) *Common { colorsConfig, _ := globalSettings.Get("wtf.colors") - // positionPath := "position" sigilsPath := "wtf.sigils" common := Common{ diff --git a/cfg/position.go b/cfg/position.go index 7bf65fad..619af555 100644 --- a/cfg/position.go +++ b/cfg/position.go @@ -52,6 +52,25 @@ func NewPositionFromYAML(name string, moduleConfig *config.Config) Position { /* -------------------- Unexported Functions -------------------- */ // If any of the position values have an error then we inform the user and exit the app +// Common examples of invalid position configuration are: +// +// position: +// top: 3 +// width: 2 +// height: 1 +// +// position: +// top: 3 +// # left: 2 +// width: 2 +// height: 1 +// +// position: +// top: 3 +// left: 2 +// width: 2 +// height: 1 +// func validatePositions(name string, errs map[string]error) { var errStr string