statusline: implement per-account status

Implement a statusline state for each account. Keep the ex line and the
push notifications global. Add account name prefix to push
notifications. Prefix status line with account name when multiple
accounts are available.

Use account-specific status line for each tab where an account is
defined.

Handle threading, filter/search, viewer passthrough and connection
status.

Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Koni Marti 2022-03-18 22:35:33 +01:00 committed by Robin Jarry
parent 807870ea35
commit 2512c0403f
10 changed files with 196 additions and 45 deletions
commands/msg

View file

@ -3,6 +3,7 @@ package msg
import (
"errors"
"git.sr.ht/~rjarry/aerc/lib/statusline"
"git.sr.ht/~rjarry/aerc/widgets"
)
@ -34,6 +35,7 @@ func (ToggleThreads) Execute(aerc *widgets.Aerc, args []string) error {
return err
}
store.SetBuildThreads(!store.BuildThreads())
acct.SetStatus(statusline.Threading(store.BuildThreads()))
acct.Messages().Invalidate()
return nil
}