aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/main.go b/main.go
index 49684c53..9b76d0cc 100644
--- a/main.go
+++ b/main.go
@@ -23,6 +23,7 @@ import (
"git.sr.ht/~rjarry/aerc/commands/terminal"
"git.sr.ht/~rjarry/aerc/config"
"git.sr.ht/~rjarry/aerc/lib/crypto"
+ "git.sr.ht/~rjarry/aerc/lib/hooks"
"git.sr.ht/~rjarry/aerc/lib/ipc"
"git.sr.ht/~rjarry/aerc/lib/templates"
libui "git.sr.ht/~rjarry/aerc/lib/ui"
@@ -242,6 +243,14 @@ func main() {
}
ui.ChannelEvents()
+ go func() {
+ defer log.PanicHandler()
+ err := hooks.RunHook(&hooks.AercStartup{Version: Version})
+ if err != nil {
+ msg := fmt.Sprintf("aerc-startup hook: %s", err)
+ aerc.PushError(msg)
+ }
+ }()
for event := range libui.MsgChannel {
switch event := event.(type) {
case tcell.Event: