aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJeffas <dev@jeffas.io>2019-07-21 21:01:51 +0100
committerDrew DeVault <sir@cmpwn.com>2019-07-26 14:00:24 -0400
commitdc4c36adbfbffd34319ddc007bad437ef802ee72 (patch)
tree1742b507d27a9564c3f51623c01266cca8f9a267 /doc
parent0950e39f538610172858a5e3b7582a7f5cb1fd64 (diff)
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.
Diffstat (limited to 'doc')
-rw-r--r--doc/aerc-config.5.scd20
1 files changed, 20 insertions, 0 deletions
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