aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hooks')
-rw-r--r--lib/hooks/mail-deleted.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/hooks/mail-deleted.go b/lib/hooks/mail-deleted.go
new file mode 100644
index 00000000..e9f13105
--- /dev/null
+++ b/lib/hooks/mail-deleted.go
@@ -0,0 +1,23 @@
+package hooks
+
+import (
+ "fmt"
+
+ "git.sr.ht/~rjarry/aerc/config"
+)
+
+type MailDeleted struct {
+ Account string
+ Folder string
+}
+
+func (m *MailDeleted) Cmd() string {
+ return config.Hooks.MailDeleted
+}
+
+func (m *MailDeleted) Env() []string {
+ return []string{
+ fmt.Sprintf("AERC_ACCOUNT=%s", m.Account),
+ fmt.Sprintf("AERC_FOLDER=%s", m.Folder),
+ }
+}