summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--config/config.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go
index 9295a1d..8028224 100644
--- a/config/config.go
+++ b/config/config.go
@@ -18,6 +18,10 @@ import (
 	"github.com/kyoh86/xdg"
 )
 
+type GeneralConfig struct {
+	DefaultSavePath string `ini:"default-save-path"`
+}
+
 type UIConfig struct {
 	IndexFormat       string   `ini:"index-format"`
 	TimestampFormat   string   `ini:"timestamp-format"`
@@ -85,6 +89,7 @@ type AercConfig struct {
 	Filters  []FilterConfig  `ini:"-"`
 	Viewer   ViewerConfig    `ini:"-"`
 	Ui       UIConfig
+	General  GeneralConfig
 }
 
 // Input: TimestampFormat
@@ -319,6 +324,11 @@ func LoadConfig(root *string, sharedir string) (*AercConfig, error) {
 			return nil, err
 		}
 	}
+	if ui, err := file.GetSection("general"); err == nil {
+		if err := ui.MapTo(&config.General); err != nil {
+			return nil, err
+		}
+	}
 	accountsPath := path.Join(*root, "accounts.conf")
 	if accounts, err := loadAccountConfig(accountsPath); err != nil {
 		return nil, err