Repository navigation
feat(login): open at login as a login item instead of a launch agent - #56
Merged
Merged
Conversation
The cask used to write a launch agent and bootstrap it after install. Homebrew 7 runs install steps in a sandbox that launchd refuses to bootstrap from, and that also blocks ServiceManagement, LaunchServices and tccutil, so no cask can start Heed any more. Heed now does what other menu bar utilities do: on its first launch it adds itself to the login items with SMAppService, and Open at Login in its menu turns that off again. Without launchd behind it, quitting just quits, so the bootout plan and its tests go. stderr is pointed at ~/Library/Logs/heed.log whenever it is not a terminal, which keeps the log where the menu, make logs and the cask's zap expect it. make install now removes the old agent, so a source install does not end up with two copies at the next login, and then opens the app.
rbstp
enabled auto-merge (squash)
October 16, 2026 23:11
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.
Heed has run as a launch agent that the cask wrote and bootstrapped after install. Homebrew 7 ends that: Ruby
postflightblocks failbrew style, andpostflight_stepsrun in a sandbox that launchd refuses to bootstrap from (rbstp/homebrew-tap#2). It blocksSMAppService, LaunchServices andtccutiltoo, so there is no install-time way left to start Heed.Heed now does what other menu bar utilities do. On its first launch it registers itself with
SMAppService.mainApp, once, so switching it off in System Settings sticks, and a new Open at Login item in the menu turns it on and off. Without launchd behind it, Quit just quits, soQuitPlanand its tests are gone. Since nothing redirects stderr any more, Heed points it at~/Library/Logs/heed.logitself whenever it isn't a terminal, which keeps Open Log,make logsand the cask's zap working.make installboots out and removes the old agent before opening the new build, so a source install doesn't come back as two copies at the next login.make restartquits and reopens instead of usingkickstart, andinstall-agentandagent.plist.inare gone. The cask side lives in rbstp/homebrew-tap#4, which has to merge first: the old cask'spostflightreadsagent.plist.in, which this release no longer ships.Tested:
swift test(286 tests),make check-package, and the realLoginItemandLogcode compiled into a throwaway Developer ID–signed app with its own bundle ID, opened through LaunchServices. That covered first-launch registration, Open at Login off and on, a relaunch after switching off (it stays off), and the stderr redirect.