diff options
author | Bence Ferdinandy <bence@ferdinandy.com> | 2023-11-22 11:54:22 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-11-23 00:14:54 +0100 |
commit | 91b26ad93f93743f3222515755d688e5864d61bd (patch) | |
tree | a70e3c0527f79f38915f1fe641977b175b8bdf14 /config/ui.go | |
parent | 019a1a5813fc30440fb8c552b9e03dfe8d5d5d17 (diff) | |
download | aerc-91b26ad93f93743f3222515755d688e5864d61bd.tar.gz |
ui: make viewer tab title configurable via templates
We had account and composer tab title configuration fields already, but
not for viewer. Add tab-title-viewer configuration, which defaults to
Subject if it is not empty and to "(no subject)" when it is empty.
Changelog-added: New `[ui].tab-title-viewer` setting to configure the
message viewer tab title.
Changelog-changed: Message viewer tab titles will now show `(no subject)`
if there is no subject in the viewed email.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'config/ui.go')
-rw-r--r-- | config/ui.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/config/ui.go b/config/ui.go index 17f2339f..5539d288 100644 --- a/config/ui.go +++ b/config/ui.go @@ -83,6 +83,7 @@ type UIConfig struct { // Tab Templates TabTitleAccount *template.Template `ini:"tab-title-account" default:"{{.Account}}"` TabTitleComposer *template.Template `ini:"tab-title-composer" default:"{{.Subject}}"` + TabTitleViewer *template.Template `ini:"tab-title-viewer" default:"{{if .Subject}}{{.Subject}}{{else}}(no subject){{end}}"` // private contextualUis []*UiConfigContext |