aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-02-03 13:14:35 +0100
committerRobin Jarry <robin@jarry.cc>2023-02-20 14:48:42 +0100
commit6cfbc87d8ab0be8d264d81b0b1f26e7b96719dfc (patch)
treec09b6b671bd90504ce0e90512b39b31f650f37fb /doc
parentd74400ac07a9f149e89fdf2b7232ffc6871f8553 (diff)
downloadaerc-6cfbc87d8ab0be8d264d81b0b1f26e7b96719dfc.tar.gz
dirlist: use templates instead of % mini language
Replace dirlist-format with two settings: dirlist-left & dirlist-right. These two settings take aerc-templates(7) and may be left empty. Add automatic translation of dirlist-format to these new settings. Display a warning on startup if dirlist-format has been converted. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/aerc-config.5.scd28
-rw-r--r--doc/aerc-templates.7.scd2
2 files changed, 13 insertions, 17 deletions
diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd
index 4d995d6b..a04f3be9 100644
--- a/doc/aerc-config.5.scd
+++ b/doc/aerc-config.5.scd
@@ -211,23 +211,17 @@ These options are configured in the *[ui]* section of _aerc.conf_.
Example:
*sort* = _from -r date_
-*dirlist-format* = _<format>_
- Describes the format string to use for the directory list.
-
- Default: _%n %>r_
-
-[- *Format specifier*
-:[ *Description*
-| _%%_
-: literal %
-| _%n_
-: directory name
-| _%N_
-: compacted directory name
-| _%r_
-: recent/unseen/total message count
-| _%>X_
-: make format specifier 'X' be right justified
+*dirlist-left* = _<go template>_
+ Template for the left side of the directory list.
+ See *aerc-templates*(7) for all available fields and functions.
+
+ Default: _{{.Folder}}_
+
+*dirlist-right* = _<go template>_
+ Template for the right side of the directory list.
+ See *aerc-templates*(7) for all available fields and functions.
+
+ Default: _{{if .Unread}}{{humanReadable .Unread}}/{{end}}{{if .Exists}}{{humanReadable .Exists}}{{end}}_
*dirlist-delay* = _<duration>_
Delay after which the messages are actually listed when entering
diff --git a/doc/aerc-templates.7.scd b/doc/aerc-templates.7.scd
index 91745e8c..83b19ac9 100644
--- a/doc/aerc-templates.7.scd
+++ b/doc/aerc-templates.7.scd
@@ -152,6 +152,7 @@ available always.
```
{{.Recent}} {{.Unread}} {{.Exists}}
+ {{.RUE}}
```
Current message counts for specific folders:
@@ -160,6 +161,7 @@ available always.
{{.Recent "inbox"}}
{{.Unread "inbox" "aerc/pending"}}
{{.Exists "archive" "spam" "foo/baz" "foo/bar"}}
+ {{.RUE "inbox"}}
```
*Status line*