From e2d5c456dc27f958d79fdf740c7b0852b2af4160 Mon Sep 17 00:00:00 2001 From: Jeffas Date: Wed, 11 Sep 2019 20:28:14 +0100 Subject: Add signatures This adds the ability for per-account signatures in the accounts.conf config file. The signature is added to emails in the editor at the bottom of the email. This includes when forwarding, replying to, and composing emails. There are two config options: signature-file and signature-cmd. The former allows a signature to be read from a file and the latter allows an arbitrary command to be executed to return the signature. The config options have been documented in aerc-config --- commands/account/compose.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'commands/account') diff --git a/commands/account/compose.go b/commands/account/compose.go index ad48fe6..039eb92 100644 --- a/commands/account/compose.go +++ b/commands/account/compose.go @@ -29,7 +29,7 @@ func (Compose) Execute(aerc *widgets.Aerc, args []string) error { return err } acct := aerc.SelectedAccount() - composer := widgets.NewComposer( + composer := widgets.NewComposer(aerc, aerc.Config(), acct.AccountConfig(), acct.Worker(), nil) tab := aerc.NewTab(composer, "New email") composer.OnHeaderChange("Subject", func(subject string) { @@ -40,7 +40,7 @@ func (Compose) Execute(aerc *widgets.Aerc, args []string) error { } tab.Content.Invalidate() }) - go composer.SetContents(strings.NewReader(body)) + go composer.PrependContents(strings.NewReader(body)) return nil } -- cgit 1.4.1-2-gfad0