You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pause scripts and providers while the displays sleep or the screen is locked #219
StableBar pauses scripts and providers only when the Mac itself sleeps. When the displays sleep, the screen is locked, or another user takes over with fast user switching, the Mac often stays awake: a desktop Mac, or a laptop whose display turns off before the system sleeps. Then every interval script and command provider keeps launching processes for a bar nobody can see.
Nothing handles screensDidSleepNotification, screensDidWakeNotification, sessionDidResignActiveNotification or com.apple.screenIsLocked. BarStore uses sessionDidBecomeActive and com.apple.screenIsUnlocked only to refresh app menus (Sources/StableBar/BarStore.swift:131-135).
Proposal
Treat displays asleep, a locked screen and an inactive session like system sleep: suspend, then resume with SENDER=resume as docs/providers.md describes. Providers whose events a widget subscribes to keep running, as they do now.
Possible today
Partly. whenVisible suspends a provider when none of its widgets is visible, but a bar on a sleeping display still counts as visible.
Activity
stablebar-releases commentedon Nov 11, 2026
🎉 This issue has been resolved in version 0.13.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀