aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hooks
Commit message (Collapse)AuthorAgeFilesLines
* hook: add mail-sent hookMoritz Poldrack2024-01-251-0/+31
| | | | | | | | | Add a hook to trigger when a message is sent. References: https://todo.sr.ht/~rjarry/aerc/136 Signed-off-by: Moritz Poldrack <git@moritz.sh> Tested-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Robin Jarry <robin@jarry.cc>
* hooks: add mail-added hookJason Cox2023-11-021-0/+23
| | | | | | | | | | | | | | The mail-added hook runs whenever a message is added to a folder. Note that the hook does not run when a new message is received (the mail-received hook already covers that) but instead runs whenever aerc itself adds a message to a folder, e.g. when moving or copying a message. Changelog-added: `mail-added` hook that triggers when a message is added to a folder. References: https://todo.sr.ht/~rjarry/aerc/136 Signed-off-by: Jason Cox <me@jasoncarloscox.com> Acked-by: Robin Jarry <robin@jarry.cc>
* hooks: add mail-deleted hookJason Cox2023-11-021-0/+23
| | | | | | | | | | | | 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 <me@jasoncarloscox.com> Acked-by: Robin Jarry <robin@jarry.cc>
* hooks: add account and folder to mail-received envRobin Jarry2023-08-041-0/+4
| | | | | | | | Add AERC_ACCOUNT and AERC_FOLDER to the environment of the mail-received hook command. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io>
* hooks: add aerc-shutdownMoritz Poldrack2023-04-011-0/+22
| | | | | | | | | | Add a hook to run when aerc shuts down. The environment is supplemented with the duration aerc was alive for. References: https://todo.sr.ht/~rjarry/aerc/136 Signed-off-by: Moritz Poldrack <git@moritz.sh> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* hooks: add aerc-startup hookMoritz Poldrack2023-04-011-0/+23
| | | | | | | | | | | Add a hook to run when aerc starts up. The environment is supplemented with aerc version and the path to its binary. References: https://todo.sr.ht/~rjarry/aerc/136 References: https://todo.sr.ht/~rjarry/aerc/139 Signed-off-by: Moritz Poldrack <git@moritz.sh> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* config: replace triggers with hooksMoritz Poldrack2023-04-013-0/+53
Deprecate triggers and replace them with hooks. Now that aerc supports running arbitrary ex commands over IPC, it is possible to run internal aerc commands *and* shell commands via external shell scripts. Hooks only allow running shell commands. Hooks info is passed via environment variables. Implements: https://todo.sr.ht/~rjarry/aerc/136 Signed-off-by: Moritz Poldrack <git@moritz.sh> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>