Skip to content

fix: notifications not displaying for menu bar app#20

Open
masonc15 wants to merge 1 commit into
angristan:mainfrom
masonc15:fix/notifications-not-displaying
Open

fix: notifications not displaying for menu bar app#20
masonc15 wants to merge 1 commit into
angristan:mainfrom
masonc15:fix/notifications-not-displaying

Conversation

@masonc15

@masonc15 masonc15 commented Jan 18, 2026

Copy link
Copy Markdown

I noticed notifications weren't triggering on my Mac despite having them enabled in the menu. After investigating, I found the root cause: macOS silences notifications for foreground apps by default, and menu bar apps like MacThrottle (configured with LSUIElement, meaning no Dock icon) are treated as foreground.

The fix implements UNUserNotificationCenterDelegate and adds the willPresent delegate method to explicitly request banner presentation. This affects all users on all macOS versions since 10.14 Mojave.

Changes:

  • Add UNUserNotificationCenterDelegate conformance to ThermalMonitor
  • Set notification center delegate on init
  • Implement willPresent to call completion handler with .banner and .sound

I've found this utility invaluable and have been using it constantly since reading your blog post a few weeks ago. I'm slightly new to OSS development, so let me know if I should change or improve anything. Thanks!

@masonc15 masonc15 marked this pull request as ready for review January 18, 2026 18:58
@angristan

Copy link
Copy Markdown
Owner

Interesting, this sounds legit but I wonder why notifications work for me?

@masonc15

Copy link
Copy Markdown
Author

Yeah, I figured as much - definitely weird. I'm running MacThrottle on an M2 Macbook Air on Tahoe 26.2. Not sure if other people have experienced the same notification bug, but this patch got it working for me at least.

@0xpr03

0xpr03 commented Mar 14, 2026

Copy link
Copy Markdown

Also doesn't work here - macOS 26.3.1, v1.7.3 of the app.

OT: Thanks for making this app! Perfect for figuring out what actual thermal throttling does under relevant loads. [And what settings to choose for Factorio & whether to thermal mod :)]

@masonc15 masonc15 force-pushed the fix/notifications-not-displaying branch from fd2ca3d to 36d59a0 Compare April 18, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants