Show Unread Mail Count in Your Mac Menu Bar
Resumen
Pixel’s announcement shares a guide to displaying Apple Mail’s unread Inbox count in the Mac menu bar using Multimeter and an AppleScript meter. It covers setup, macOS permissions, refresh intervals, and optional alerts, helping community members spot unread messages without opening Mail.
DEV Community
Show your unread Mail count in your Mac menu bar
This guide first appeared on multimeterapp.com. Multimeter is a Mac menu bar app that turns any number into a live meter. Mail’s Dock badge is easy to miss when the Dock is hidden, and Mail’s window is usually behind everything else. A Script meter asks Mail with AppleScript how many messages in the Inbox are unread and puts the number next to the clock. What you need Multimeter for macOS 13 or later, $19.99 once. The direct download version of Multimeter from this site (the Script source isn’t in the Mac App Store version). Multimeter 1.1.1 or later. Earlier versions can’t ask macOS for permission to talk to other apps. Choose Check for Updates… from any meter’s menu. Apple Mail with at least one account set up. Set it up Here’s the command. It asks Mail for the unread count of the Inbox, the one at the top of Mail’s sidebar that combines your accounts, and prints a placeholder when Mail isn’t running: osascript -e 'if application "Mail" is running then' -e 'tell application "Mail" to return unread count of inbox' -e 'else' -e 'return "{\"value\": 0, \"formatted\": \"closed\"}"' -e 'end if'
In Multimeter, choose Add Meter… from any meter’s menu, pick Script and paste the command. Set Refresh every to 1 minute. Mail answers in well under a second, but there’s no reason to ask it more often, and 5 minutes is fine for a quieter inbox. Set the label to MAIL, the range to 0 to 50, and alerts to High values with a warning at 10 and critical at 25 if you want the number to change color as mail piles up. With Mail open, wait for the first refresh. macOS asks once: “Multimeter” wants access to control “Mail”. Allowing control will provide access to documents and data in “Mail”, and to perform actions within that app. Below it is Multimeter’s reason: “Multimeter runs your script meters, and scripts that read other apps (like Things, Reminders, Mail or Music) need your permission to control them.” Click Allow. Until you do, the meter shows a dash; the number appears at the next refresh, or right away with Refresh Now in the meter’s menu. Multimeter settings In Customize This Meter… (from the meter’s menu): Settings for this meter Setting Value Source Script Command the osascript line above Refresh every 1 minute or slower Range 0 to 50 Alerts High values: warning 10, critical 25 (optional) Label MAIL Face Label & Value or LCD Readout Width 120 pt for Label & Value Tested: Set up on October 31, 2026 in Multimeter 1.1.1 on macOS 27, with one test mail account holding 7 unread messages. macOS showed the Automation prompt with Multimeter’s reason at the first refresh; after Allow the menu bar showed MAIL 7 in Label & Value and LCD Readout. After 2 messages were marked read it showed MAIL 5 at the next refresh. With Mail quit, both meters showed closed and Mail stayed closed for the next two refreshes; reopening Mail brought back MAIL 5. The command took about half a second when run in Terminal. Script meters need the direct download version of Multimeter from this site, which is the one on sale now. How commands run, the PATH they see and the 10 second limit are in the Script meters guide. Limits Mail must be open. That’s on purpose: asking a closed Mail would launch it. The count is the Inbox only. Unread mail that rules moved to other mailboxes isn’t included; see the variation below for one mailbox. If Mail is set to show Categories, its Dock badge can count Primary only. This meter counts every unread message in the Inbox. Variations One account’s inbox Replace inbox with the account’s mailbox. The account name is the one in Mail’s sidebar: Command osascript -e 'if application "Mail" is running then' -e 'tell application "Mail" to return unread count of mailbox "INBOX" of account "Work"' -e 'end if'
Notify me when mail arrives Set alerts to High values with a critical level of 1 and turn on Notify me when it goes critical. Multimeter waits 15 minutes between notifications for the same meter, so a busy inbox won’t keep pinging y...

Powered by Readybot.io