summaryrefslogtreecommitdiff
path: root/config/aerc.conf
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-03-31 14:24:53 -0400
committerDrew DeVault <sir@cmpwn.com>2019-03-31 14:24:53 -0400
commitbbdf9df75e8597e38cf1d90145f22aab9bd95178 (patch)
treee721502779327758956694edffbd6e01762801e9 /config/aerc.conf
parent711d22891bd50646d1cf925fbf0b8a760c638fd0 (diff)
downloadaerc-bbdf9df75e8597e38cf1d90145f22aab9bd95178.zip
Add basic filter implementation
Diffstat (limited to 'config/aerc.conf')
-rw-r--r--config/aerc.conf45
1 files changed, 20 insertions, 25 deletions
diff --git a/config/aerc.conf b/config/aerc.conf
index 5a4317f..3a89151 100644
--- a/config/aerc.conf
+++ b/config/aerc.conf
@@ -54,32 +54,12 @@ empty-message=(no messages)
[viewer]
#
-# We can use different programs to display various kinds of email attachments.
-# These programs will have the mail piped into them and are expected to output
-# it ready to display on a terminal (you can include terminal control
-# characters if you like, for colors and such). Emails will be stripped of
-# non-printable characters before being piped into these commands, and will be
-# encoded with UTF-8. These commands are invoked with sh and run
-# non-interactively, and their output is piped into your pager command
-# (interactively). The following environment variables will be set:
+# Specifies the pager to use when displaying emails. Note that some filters
+# may add ANSI codes to add color to rendered emails, so you may want to use a
+# pager which supports ANSI codes.
#
-# $WIDTH: the width of the terminal window
-# $HEIGHT: the height of the terminal window
-# $MIMETYPE: the email's mimetype
-#
-# You can use * as a wildcard for any subtype of a given mimetype. When
-# displaying a text/* message and no command matches, the message will just be
-# piped directly into your pager (after being stripped of non-printable
-# characters).
-
-# Examples:
-#
-#text/html=w3m -T text/html -cols $WIDTH -dump -o display_image=false -o display_link_number=true
-text/*=fold -sw $WIDTH
-
-#
-# Default: less -r
-pager=less -r
+# Default: less -R
+pager=less -R
#
# If an email offers several versions (multipart), you can configure which
@@ -89,6 +69,21 @@ pager=less -r
# Default: text/plain,text/html
alternatives=text/plain,text/html
+[filters]
+#
+# Filters allow you to pipe an email body through a shell command to render
+# certain emails differently, e.g. highlighting them with ANSI escape codes.
+#
+# The first filter which matches the email's mimetype will be used, so order
+# them from most to least specific.
+#
+# You can also match on non-mimetypes, by prefixing with the header to match
+# against (non-case-sensitive) and a colon, e.g. subject:text will match a
+# subject which contains "text". Use header~:regex to match against a regex.
+subject~:PATCH=contrib/hldiff.py
+text/html=w3m -T text/html -cols $(tput cols) -dump -o display_image=false -o display_link_number=true
+text/*=contrib/plaintext.py
+
[lbinds]
#
# Binds are of the form <input keys> = <output keys>