about summary refs log tree commit diff stats
path: root/config
diff options
context:
space:
mode:
authorARaspiK <araspik@protonmail.com>2020-07-01 07:52:14 +0000
committerReto Brunner <reto@labrat.space>2020-07-02 09:13:14 +0200
commite1c2b596dc9e45976253d75a6b704914fcdcb82c (patch)
tree793aed9505dc3c47da5aa44f3ffb25ff40cb0da5 /config
parentbf16ccde484ce3b6d2a4b843e7ebc04a9b2a957d (diff)
downloadaerc-e1c2b596dc9e45976253d75a6b704914fcdcb82c.tar.gz
Add a 'folders-exclude' option
Added a 'folders-exclude' option that allows removing selected folders
from the directory list sidebar. My motivating example was that removing
a single folder from the list using Golang regexes seemed pretty hard,
so this is a better way to do it. The excluded folders list is included
in the man page.
Diffstat (limited to 'config')
-rw-r--r--config/config.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go
index 8ebd69d..ce59944 100644
--- a/config/config.go
+++ b/config/config.go
@@ -76,6 +76,7 @@ type AccountConfig struct {
 	Source          string
 	SourceCredCmd   string
 	Folders         []string
+	FoldersExclude	[]string
 	Params          map[string]string
 	Outgoing        string
 	OutgoingCredCmd string
@@ -186,6 +187,10 @@ func loadAccountConfig(path string) ([]AccountConfig, error) {
 				folders := strings.Split(val, ",")
 				sort.Strings(folders)
 				account.Folders = folders
+			} else if key == "folders-exclude" {
+				folders := strings.Split(val, ",")
+				sort.Strings(folders)
+				account.FoldersExclude = folders
 			} else if key == "source-cred-cmd" {
 				account.SourceCredCmd = val
 			} else if key == "outgoing" {