From dc4c36adbfbffd34319ddc007bad437ef802ee72 Mon Sep 17 00:00:00 2001 From: Jeffas Date: Sun, 21 Jul 2019 21:01:51 +0100 Subject: Add new-email trigger This patch sets up the trigger config section of aerc.conf. Each trigger has its own function which is called from the place where it is triggered. Currently only the new-email trigger is implemented. The triggers make use of format strings. For instance, in the new-email trigger this allows the user to select the trigger command and also the information extracted from the command and placed into their command. To actually execute the trigger commands the keypresses are simulated. Further triggers can be implemented in the future. Formatting of the command is moved to a new package. --- doc/aerc-config.5.scd | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc') diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd index 665f4f4..08f65af 100644 --- a/doc/aerc-config.5.scd +++ b/doc/aerc-config.5.scd @@ -68,6 +68,10 @@ These options are configured in the *[ui]* section of aerc.conf. : comma-separated list of formatted CC names and addresses | %s : subject +| %t +: the (first) address the new email was sent to +| %T +: the account name which received the email | %u : sender mailbox name (e.g. "smith" in "smith@example.net") | %v @@ -164,6 +168,22 @@ aerc ships with some default filters installed in the share directory (usually _/usr/share/aerc/filters_). Note that these may have additional dependencies that aerc does not have alone. +## TRIGGERS + +Triggers specify commands to execute when certain events occur. + +They are configured in the *[triggers]* section of aerc.conf. + +*new-email* + Executed when a new email arrives in the selected folder. + + e.g. new-email=exec notify-send "New email from %n" "%s" + + Default: "" + + Format specifiers from *index-format* are expanded with respect to the new + message. + # ACCOUNTS.CONF This file is used for configuring each mail account used for aerc. Each section -- cgit 1.4.1-2-gfad0