aboutsummaryrefslogtreecommitdiffstats
path: root/aerc.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-02-19 14:06:57 +0100
committerRobin Jarry <robin@jarry.cc>2022-02-19 15:24:55 +0100
commitbb0f1801402e98266d2554a5f002dc8ce0419808 (patch)
treef1100f9abb31293895b58ce7522ebe73e5262073 /aerc.go
parent05ad96a30cb8ea17970c84ea7c72f8f3def5afa5 (diff)
downloadaerc-bb0f1801402e98266d2554a5f002dc8ce0419808.tar.gz
config: do not hardcode sharedir
Instead of using a static SHAREDIR at compile time, use a list of standard paths to use at runtime for templates, config files and stylesets. This implies removing all default filters in the default configuration. Replace them with basic commands. New users can configure the filters as they wish. Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'aerc.go')
-rw-r--r--aerc.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/aerc.go b/aerc.go
index 6467c616..555b3a31 100644
--- a/aerc.go
+++ b/aerc.go
@@ -86,10 +86,8 @@ func getCompletions(aerc *widgets.Aerc, cmd string) []string {
return completions
}
-var (
- ShareDir string
- Version string
-)
+// set at build time
+var Version string
func usage() {
log.Fatal("Usage: aerc [-v] [mailto:...]")
@@ -152,7 +150,7 @@ func main() {
logger = log.New(logOut, "", log.LstdFlags)
logger.Println("Starting up aerc")
- conf, err := config.LoadConfigFromFile(nil, ShareDir, logger)
+ conf, err := config.LoadConfigFromFile(nil, logger)
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to load config: %v\n", err)
os.Exit(1)