A Hammerspoon Spoon that monitors app dock badges and displays notification counts in your menu bar.
Repository: https://github.com/hugoh/AppBadgeWatcher.spoon
- Monitors dock badge values of specified applications
- Displays clean menu bar indicators with app icons
- Configurable refresh interval
- "Snooze" badge counts by clicking menu bar item
If you're looking for other solutions in this space, consider:
- Doll - Native macOS app with similar functionality
- Badgeify - Commercial alternative on Mac App Store
AppBadgeWatcher aims to provide a Hammerspoon-powered, configurable, lightweight option.
- Ensure you have Hammerspoon installed
- Clone this repository to your Spoons directory:
cd ~/.hammerspoon/Spoons
git clone https://github.com/hugoh/AppBadgeWatcher.spoon.gitBelow is a sample configuration to add this to your .hammerspoon/init.lua:
-- Load the Spoon
hs.loadSpoon("AppBadgeWatcher")
-- Configure watched apps and settings
spoon.AppBadgeWatcher.appsToWatch = {
"Slack",
"Microsoft Teams",
}
-- Optional: default configuration showed below
spoon.AppBadgeWatcher.refreshInterval = 15 -- Update every 15 seconds
spoon.AppBadgeWatcher.nothingIndicator = "・" -- Shown when no notifications
spoon.AppBadgeWatcher.grayscaleIcon = false -- Convert app icons to grayscale?
spoon.AppBadgeWatcher.fontSize = 6 -- Badge font size
spoon.AppBadgeWatcher.textOffset = { x = 2, y = 0 } -- Text offset on icon
-- Start the watcher
spoon.AppBadgeWatcher:start()The Spoon periodically checks the Dock's accessibility elements for badge values on specified applications. Key features:
- Smart Polling: Checks at configured intervals (default 15s)
- Icon Cache: App icons are cached for better performance
- Compact Display: Shows ∞ symbol for counts over 9
- Low Profile: Displays subtle dot when no notifications exist
This Spoon requires Accessibility API access to:
- Monitor dock badge values
- Update menu bar indicators
Enable access in:
- System Settings → Privacy & Security → Accessibility
- Add Hammerspoon to the allowed apps list