From 31b50f24d51fd429f30e20fb42a5681149e5bfe7 Mon Sep 17 00:00:00 2001 From: Jason Cox Date: Sun, 29 Oct 2023 17:40:47 -0400 Subject: hooks: add mail-deleted hook The mail-deleted hook runs whenever a message is deleted from a folder. Note that this means moving a message from one folder to another triggers the mail-deleted hook. Changelog-added: `mail-deleted` hook that triggers when a message is removed/moved from a folder. References: https://todo.sr.ht/~rjarry/aerc/136 Signed-off-by: Jason Cox Acked-by: Robin Jarry --- doc/aerc-config.5.scd | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd index a45e2443..200c0609 100644 --- a/doc/aerc-config.5.scd +++ b/doc/aerc-config.5.scd @@ -958,6 +958,19 @@ They are configured in the *[hooks]* section of aerc.conf. *mail-received* = _notify-send "[$AERC_ACCOUNT/$AERC_FOLDER] New mail from $AERC_FROM_NAME" "$AERC_SUBJECT"_ +*mail-deleted* = __ + Executed when a message is deleted from a folder. Note that this hook is + triggered when moving a message from one folder to another. + + Variables: + + - *AERC_ACCOUNT* + - *AERC_FOLDER* + + Example: + + *mail-deleted* = _mbsync "$AERC_ACCOUNT:$AERC_FOLDER"_ + *aerc-shutdown* = __ Executed when aerc shuts down. Aerc will wait for the command to finish before exiting. -- cgit