From 152f8c9519ac1b7b35c3789b03f3d1cc3b1e8881 Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Mon, 29 Jul 2019 10:50:02 -0400 Subject: Ring bell when new messages arrive Add a "new-message-bell" option to the UI section of aerc.conf. A new hook into the message store allows the msglist widget to detect new messages being added to the displayed list. When new messages are delivered, and the new-message-bell option is enabled (as it is by default), the terminal will beep. --- config/aerc.conf.in | 6 ++++++ config/config.go | 2 ++ 2 files changed, 8 insertions(+) (limited to 'config') diff --git a/config/aerc.conf.in b/config/aerc.conf.in index 55dfa13..4d0f9fd 100644 --- a/config/aerc.conf.in +++ b/config/aerc.conf.in @@ -37,6 +37,12 @@ empty-dirlist=(no folders) # Default: false mouse-enabled=false +# +# Ring the bell when new messages are received +# +# Default: yes +new-message-bell=true + [viewer] # # Specifies the pager to use when displaying emails. Note that some filters diff --git a/config/config.go b/config/config.go index 8ba705c..bfcbecf 100644 --- a/config/config.go +++ b/config/config.go @@ -32,6 +32,7 @@ type UIConfig struct { EmptyMessage string `ini:"empty-message"` EmptyDirlist string `ini:"empty-dirlist"` MouseEnabled bool `ini:"mouse-enabled"` + NewMessageBell bool `ini:"new-message-bell"` } const ( @@ -344,6 +345,7 @@ func LoadConfigFromFile(root *string, sharedir string) (*AercConfig, error) { EmptyMessage: "(no messages)", EmptyDirlist: "(no folders)", MouseEnabled: false, + NewMessageBell: true, }, Viewer: ViewerConfig{ -- cgit v1.2.3