From 618a500341d54ec5bec6d035a86b1307ff1dad0a Mon Sep 17 00:00:00 2001 From: Jeffas Date: Wed, 11 Sep 2019 17:37:21 +0100 Subject: Add display of unread messages in dirlist Add an onUpdateDirs handler. This is used to invalidate the dirlist and redraw with the correct number of recent/unread/total messages is shown. A config option and formatting options are provided. --- config/aerc.conf.in | 5 +++++ config/config.go | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/aerc.conf.in b/config/aerc.conf.in index 4d0f9fd..c50b7b9 100644 --- a/config/aerc.conf.in +++ b/config/aerc.conf.in @@ -43,6 +43,11 @@ mouse-enabled=false # Default: yes new-message-bell=true +# Describes the format string to use for the directory list +# +# Default: %n %>r +dirlist-format=%n %>r + [viewer] # # Specifies the pager to use when displaying emails. Note that some filters diff --git a/config/config.go b/config/config.go index 06caec1..738fd1d 100644 --- a/config/config.go +++ b/config/config.go @@ -35,6 +35,7 @@ type UIConfig struct { NewMessageBell bool `ini:"new-message-bell"` Spinner string `ini:"spinner"` SpinnerDelimiter string `ini:"spinner-delimiter"` + DirListFormat string `ini:"dirlist-format"` } const ( @@ -349,9 +350,9 @@ func LoadConfigFromFile(root *string, sharedir string) (*AercConfig, error) { EmptyDirlist: "(no folders)", MouseEnabled: false, NewMessageBell: true, - Spinner: - "[..] , [..] , [..] , [..] , [..], [..] , [..] , [..] ", - SpinnerDelimiter: ",", + Spinner: "[..] , [..] , [..] , [..] , [..], [..] , [..] , [..] ", + SpinnerDelimiter: ",", + DirListFormat: "%n %>r", }, Viewer: ViewerConfig{ -- cgit 1.4.1-2-gfad0