Repository navigation
feat: register data sources behind one interface, including event-driven ones - #53
Merged
Merged
Conversation
…source in Diagnostics
…t device changes AudioMonitor hops CoreAudio notifications to the main actor, so a change never runs between a refresh's read and its send, and ChangeMonitor now says so. The provider interval docs now give the real first retry delay.
M4n0x
force-pushed
the
feat/data-sources
branch
from
October 17, 2026 08:24
342a208 to
8e21d1d
Compare
This was referenced Oct 19, 2026
|
🎉 This PR is included in version 0.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This was referenced Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
This implements #17's proposal. The issue's
disk,nowPlayingandbluetoothproviders are left for their own pull requests, so this one doesn't close it.Built-in data sources were a fixed list, repeated across the code and the schema, and sampled on a timer. As a result:
Changes
perf). An unchanged script or provider output assigns nothing, so repeated updates redraw nothing.refactor). One table lists each event's name and whatINFOholds, and a test checks it against the README.refactor). Commands, streams and native readings run as data sources behind one runner, which keeps diagnostics, retry backoff and suspension.feat).--queryshow each widget's source.feat). Battery widgets update when macOS reports a power change, without polling, and subscribed scripts getpowerSourceChange(acorbattery).feat). CoreAudio listeners update audio widgets as soon as the volume, the mute state or the default output device changes, and sendvolumeChangeandoutputDeviceChange. The modular example's volume script listens tovolumeChange.feat). Setup lists the access that the data sources of enabled widgets need, with a link to its System Settings pane. Calendar is the first, with Calendars.Testing
swift testpasses 253 tests at the branch tip, 48 more than Draw every widget through layout blocks #16's branch: 43 for this issue and 5 for the calendar move. Every commit builds with its tests and passes the suite. No test requests a permission, touches the Keychain or reads a calendar.INFO, across a sweep of more than 50 changes.outputDeviceChangecarried the device name. When a device change and its volume change arrive together, a script can get only the later one; the README's rule for coalescing pending refreshes covers this.battery, thenac, and the battery widget followed within 1 to 2 seconds.volumeChangescript with no audio widget while switching devices;Merging
This pull request builds on #16's branch. GitHub moves it to
mainwhen #16 merges and its branch is deleted.Use a merge commit, so each commit reaches the changelog: five
featand oneperf.Claude Opus 5.5 via Claude Code