AppBadgeWatcher

v1.1.0 — A Hammerspoon Spoon that monitors app dock badges and displays notification counts in your menu bar.


Variables

appsToWatch
AppBadgeWatcher.appsToWatch

List of application names (strings) to watch for dock badge counts.

refreshInterval
AppBadgeWatcher.refreshInterval

Seconds between badge refresh polls (default: 15).

nothingIndicator
AppBadgeWatcher.nothingIndicator

Menu bar text shown when no badges are active (default: "・").

grayscaleIcon
AppBadgeWatcher.grayscaleIcon

Convert app icons to grayscale in the menu bar (default: false).

fontSize
AppBadgeWatcher.fontSize

Font size for badge count labels (default: 6).

textOffset
AppBadgeWatcher.textOffset

Pixel offset {x, y} applied to badge text on the icon (default: { x = 2, y = 0 }).

Methods

start
AppBadgeWatcher:start()

Start the badge watcher: create the menu bar item and begin polling at the configured interval.

stop
AppBadgeWatcher:stop()

Stop the badge watcher and remove the menu bar item.