diff options
Diffstat (limited to 'config/config.go')
-rw-r--r-- | config/config.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go index 5c5094a..8926fcd 100644 --- a/config/config.go +++ b/config/config.go @@ -48,6 +48,10 @@ type BindingConfig struct { Terminal *KeyBindings } +type ComposeConfig struct { + Editor string `ini:"editor"` +} + type FilterConfig struct { FilterType int Filter string @@ -63,6 +67,7 @@ type ViewerConfig struct { type AercConfig struct { Bindings BindingConfig + Compose ComposeConfig Ini *ini.File `ini:"-"` Accounts []AccountConfig `ini:"-"` Filters []FilterConfig `ini:"-"` @@ -206,6 +211,11 @@ func LoadConfig(root *string) (*AercConfig, error) { } } } + if compose, err := file.GetSection("compose"); err == nil { + if err := compose.MapTo(&config.Compose); err != nil { + return nil, err + } + } if ui, err := file.GetSection("ui"); err == nil { if err := ui.MapTo(&config.Ui); err != nil { return nil, err |