diff options
Diffstat (limited to 'config/config.go')
-rw-r--r-- | config/config.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go index 4a049fa0..f8637292 100644 --- a/config/config.go +++ b/config/config.go @@ -84,6 +84,11 @@ type ViewerConfig struct { HeaderLayout [][]string `ini:"-"` } +type TriggersConfig struct { + NewEmail string `ini:"new-email"` + ExecuteCommand func(command []string) error +} + type AercConfig struct { Bindings BindingConfig Compose ComposeConfig @@ -91,6 +96,7 @@ type AercConfig struct { Accounts []AccountConfig `ini:"-"` Filters []FilterConfig `ini:"-"` Viewer ViewerConfig `ini:"-"` + Triggers TriggersConfig `ini:"-"` Ui UIConfig General GeneralConfig } @@ -278,6 +284,11 @@ func (config *AercConfig) LoadConfig(file *ini.File) error { return err } } + if triggers, err := file.GetSection("triggers"); err == nil { + if err := triggers.MapTo(&config.Triggers); err != nil { + return err + } + } return nil } |