Menu-Bar-Dock icon indicating copy to clipboard operation
Menu-Bar-Dock copied to clipboard

Feature Request: Show Notification Badges

Open brijazz opened this issue 4 years ago • 8 comments

Having the icons show notification badges (much as they do in the standard system Dock) would be fantastic!

brijazz avatar Aug 27 '21 11:08 brijazz

Is this technically feasible? I'd love to see this feature. The only reason I keep the dock visible is for the notification badges

stavfx avatar Jan 24 '22 17:01 stavfx

If you can find me an official apple api to get notifications then sure

EthanSK avatar Jan 25 '22 13:01 EthanSK

I don't know the first thing about macos development, so I don't know if it's possible to get a handle on another app's NSApplication object or how. But if it is possible, looks like NSApplication.dockTile.badgeLabel is what we're interested in.

https://developer.apple.com/documentation/appkit/nsdocktile/1524433-badgelabel

stavfx avatar Jan 25 '22 21:01 stavfx

This might be nothing of use, but when I had a Mac with a TouchBar I used to show notifications in the bar by polling apps' dock badges with AppleScript, like so:

tell application "System Events" tell process "Dock" set badgeNumber to value of attribute "AXStatusLabel" of UI element "NetNewsWire" of list 1 end tell end tell

The script returns the value indicated in the Dock’s badge.

brijazz avatar Jan 25 '22 21:01 brijazz

oh wow this is great, I hacked this into a simple script together with xbar (https://xbarapp.com/) and this does exactly what I need. Not as pretty as this project tho :)

stavfx avatar Jan 25 '22 22:01 stavfx

oh wow this is great, I hacked this into a simple script together with xbar (https://xbarapp.com/) and this does exactly what I need. Not as pretty as this project tho :)

Could you share your script please :)

fenneclabs avatar Jul 22 '22 14:07 fenneclabs

I'm no developer but you may be able to look at the source code for the app "Doll", which has the red badge count option: https://github.com/xiaogdgenuine/Doll

bauerp avatar Aug 06 '22 12:08 bauerp

I'm no developer but you may be able to look at the source code for the app "Doll", which has the red badge count option: https://github.com/xiaogdgenuine/Doll

thx, I'll use Doll app instead!

fenneclabs avatar Aug 22 '22 09:08 fenneclabs