- JavaScript 89%
- HTML 6.3%
- Shell 4.7%
| .forgejo/workflows | ||
| api | ||
| .gitignore | ||
| background.js | ||
| build.sh | ||
| LICENSE | ||
| manifest.json | ||
| options.html | ||
| options.js | ||
| README.md | ||
tobu-badge
Thunderbird add-on: choose which accounts count towards the unread badge on the app icon (the macOS dock, the Windows taskbar, the Linux tray). Thunderbird 161 or later.
Install
Download the .xpi from
the latest release,
then in Thunderbird: Add-ons > gear > Install Add-on From File. Updates don't
install themselves; download and install each new release the same way.
Use
Open the add-on's settings: every account with an inbox has a checkbox, all ticked by default. Untick an account to leave it out of the badge. The change applies at once; new accounts count until you untick them.
Works with both badge settings in Settings > General > App icon options: total unread and total new messages. Mail still arrives and Thunderbird's own new-mail alerts are not affected.
How it works
Thunderbird has no setting for this. The add-on uses an experiment API to step in between Thunderbird's message counter and the code that draws the badge: on every change it recounts the inboxes itself, skips the unticked accounts, and passes that number on. Disable or remove the add-on and Thunderbird's own count is back right away.
This relies on Thunderbird internals (MailNotificationService and MailNotificationManager), so a new Thunderbird version can break it. Only tested on macOS.
Build
./build.sh
Writes tobu-badge-<version>.xpi. Install it through Add-ons > gear > Install
Add-on From File, or load manifest.json as a temporary add-on via Tools >
Developer Tools > Debug Add-ons.
Release
Bump version in manifest.json, commit and push, then tag and push the tag:
git tag v1.0.1
git push origin v1.0.1
Forgejo Actions builds the xpi and publishes it as a release. The run stops if the tag doesn't match the manifest version.
Every push to main also replaces the nightly pre-release. It keeps the
manifest version; its release notes name the commit.
License
GPL-3.0-or-later. See LICENSE.