diff options
Diffstat (limited to 'config/statusline.go')
-rw-r--r-- | config/statusline.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/config/statusline.go b/config/statusline.go index 1e7d723e..483241c0 100644 --- a/config/statusline.go +++ b/config/statusline.go @@ -11,23 +11,25 @@ type StatuslineConfig struct { DisplayMode string `ini:"display-mode"` } -func defaultStatuslineConfig() StatuslineConfig { - return StatuslineConfig{ +func defaultStatuslineConfig() *StatuslineConfig { + return &StatuslineConfig{ RenderFormat: "[%a] %S %>%T", Separator: " | ", DisplayMode: "", } } -func (config *AercConfig) parseStatusline(file *ini.File) error { +var Statusline = defaultStatuslineConfig() + +func parseStatusline(file *ini.File) error { statusline, err := file.GetSection("statusline") if err != nil { goto out } - if err := statusline.MapTo(&config.Statusline); err != nil { + if err := statusline.MapTo(&Statusline); err != nil { return err } out: - log.Debugf("aerc.conf: [statusline] %#v", config.Statusline) + log.Debugf("aerc.conf: [statusline] %#v", Statusline) return nil } |