aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-03-11 20:42:55 +0100
committerRobin Jarry <robin@jarry.cc>2023-03-31 21:02:23 +0200
commit2f46f64b0b0b93e99b4754a566c84a08d4563078 (patch)
treea91261379109115c6116e1106ec3e37b62eba048 /doc
parent47675e80850d981b19c6fb231fbebaf5674f3682 (diff)
downloadaerc-2f46f64b0b0b93e99b4754a566c84a08d4563078.tar.gz
styleset: allow dynamic msglist styling
Add support for dynamic msglist*.$HEADER,$VALUE.$ATTR = $VALUE where $VALUE can be either a fixed string or a regular expression. This is intended as a replacement of contextual ui sections based on subject values. Implements: https://todo.sr.ht/~rjarry/aerc/18 Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/aerc-stylesets.7.scd20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/aerc-stylesets.7.scd b/doc/aerc-stylesets.7.scd
index 61d6843d..c9f0a78f 100644
--- a/doc/aerc-stylesets.7.scd
+++ b/doc/aerc-stylesets.7.scd
@@ -248,6 +248,26 @@ The order for *dirlist_\** styles is:
. *dirlist_unread*
. *dirlist_recent*
+# DYNAMIC MESSAGE LIST STYLES
+
+All *msglist_\** styles can be defined for specific email header values. The
+syntax is as follows:
+
+ *msglist_<name>*._<header>_,_<header_value>_.*<attribute>* = _<attr_value>_
+
+If _<header_value>_ starts with a tilde character _~_, it will be interpreted as
+a regular expression.
+
+Examples:
+
+```
+msglist\*.X-Sourcehut-Patchset-Update,APPROVED.fg = green
+msglist\*.X-Sourcehut-Patchset-Update,NEEDS\_REVISION.fg = yellow
+msglist\*.X-Sourcehut-Patchset-Update,REJECTED.fg = red
+"msglist_*.Subject,~^(\[[\w-]+\]\s*)?\[(RFC )?PATCH.fg" = #ffffaf
+"msglist_*.Subject,~^(\[[\w-]+\]\s*)?\[(RFC )?PATCH.selected.fg" = #ffffaf
+```
+
# COLORS
The color values are set using the values accepted by the tcell library.