We should probably have a hook for this case, too. BEL doesn’t come with any data but we could pass the tab title to the hook context.
I found it particularly useful to be able to identify the tab (mailbox) where new mail arrives by implementing this feature. If that feature is implemented, it would fulfill my above desire. It seems concise and clean. When new mail arrives in aerc, the tmux window displays a bell notification. Not being able to identify it in a subsequently activated aerc tab would be particularly inconvenient if the user is managing a large number of mailboxes.
Maybe this could be done by adding
TabTitleTerm
setting which would make it possible to do something liketab-title-term={{if .Bell}}{{.Style .Title "bold"}}{{else}}{{.Title}}{{end}}
where
.Title
would return what the tab displays now and.Bell
would be a flag indicating whether the process has rung the bell and would get cleared upon the tab being focused?As for what ~tkna asks: I believe you can already do this. Take a look at
tab-title-account
. For instance I have[ui] tab-title-account={{.Account}}{{if .Recent "INBOX"}} ({{.Recent "INBOX"}}){{end}}
in my aerc config. You can also make the title bold, but it's currently slightly broken, see #223. Also the
Recent
status may not clear for you as you would expect, see the first comment at #242.