From b2fa5a16f52741a6f7f6e5f33561457d702dc31d Mon Sep 17 00:00:00 2001 From: Srivathsan Murali Date: Thu, 23 Jan 2020 13:56:48 +0100 Subject: Contextual UI Configuration + Adds parsing of contextual ui sections to aerc config. + Add GetUiConfig method for AercConfig that is used to get the specialized UI config. + Add UiConfig method to AccountView to get specialized UI Config. + Modifies Aerc codebase to use specialized UIConfig instead. + Adds documentation for Contextual UI Configuration --- doc/aerc-config.5.scd | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'doc') diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd index 791a39d..c747c61 100644 --- a/doc/aerc-config.5.scd +++ b/doc/aerc-config.5.scd @@ -168,6 +168,46 @@ These options are configured in the *[ui]* section of aerc.conf. Default: 250ms +## Contextual UI Configuration + +The UI configuration can be specialized for accounts, specific mail +directories and message subjects. The specializations are added using +contextual config sections based on the context. + +The contextual UI configuration is merged to the base UiConfig in the +following order: +*Base UIConfig > Account Context > Folder Context > Subject Context.* + +*[ui:account=]* + Adds account specific configuration with the account name. + +*[ui:folder=]* + Add folder specific configuration with the folder name. + +*[ui:folder~]* + Add folder specific configuration for folders whose names match the regular + expression. + +*[ui:subject~]* + Add specialized ui configuration for messages that match a given regular + expression. + +Example: +``` +[ui:account=Work] +sidebar-width=... + +[ui:folder=Sent] +index-format=... + +[ui:folder~Archive/\d+/.*] +index-format=... + +[ui:subject~^\[PATCH] +index-format=... +``` + + ## VIEWER These options are configured in the *[viewer]* section of aerc.conf. -- cgit v1.2.3