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:
parent
807870ea35
commit
2512c0403f
10 changed files with 196 additions and 45 deletions
commands/msgview
|
@ -3,6 +3,7 @@ package msgview
|
|||
import (
|
||||
"errors"
|
||||
|
||||
"git.sr.ht/~rjarry/aerc/lib/statusline"
|
||||
"git.sr.ht/~rjarry/aerc/widgets"
|
||||
)
|
||||
|
||||
|
@ -26,10 +27,8 @@ func (ToggleKeyPassthrough) Execute(aerc *widgets.Aerc, args []string) error {
|
|||
}
|
||||
mv, _ := aerc.SelectedTab().(*widgets.MessageViewer)
|
||||
keyPassthroughEnabled := mv.ToggleKeyPassthrough()
|
||||
if keyPassthroughEnabled {
|
||||
aerc.SetExtraStatus("[passthrough]")
|
||||
} else {
|
||||
aerc.ClearExtraStatus()
|
||||
if acct := mv.SelectedAccount(); acct != nil {
|
||||
acct.SetStatus(statusline.Passthrough(keyPassthroughEnabled))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue