Neomutt: Get unread count outside of neomutt

Created on 21 Jan 2020  路  1Comment  路  Source: neomutt/neomutt

I would like to show the unread emails count on my waybar only when I get a certain number of unread emails (eg 50).

I couldn't find any good parameter for such a query with neomutt --help.

  • neomutt -D doesn't return a unread count variable to display with neomutt -Q
  • only neomutt -B seems to return to stdout otherwise, and I couldn't find a function to use with neomutt -e (tried things like neomutt -B -e "printf('%u')")

I found the new-mail feature, which can do the trick (update a file with the unread count, and have my bar listen to that file then only display the count if > 50), but this sounds suboptimal.
Isn't there a better way to do it?

question

Most helpful comment

Unfortunately, not yet.

We're trying to sort out the code, which is still pretty tangled.
We're hoping to create tidy, self-contained libraries for each mailbox type.
When they're done, it'll be easy to write useful helper programs to extract that sort of data.

>All comments

Unfortunately, not yet.

We're trying to sort out the code, which is still pretty tangled.
We're hoping to create tidy, self-contained libraries for each mailbox type.
When they're done, it'll be easy to write useful helper programs to extract that sort of data.

Was this page helpful?
0 / 5 - 0 ratings