Repository navigation
feat(settings): a Settings window, heed://set, and settings that take as written - #47
Merged
Merged
Conversation
… as written Heed read its settings at launch and on SIGHUP, so every defaults write in the README came with a restart. A key-value observer on the defaults domain now reloads the running agent whenever a key changes, from whichever process changed it, and the SIGHUP handler is gone. A run of writes lands as one reload. The settings are one table, Setting.swift, and Config.load reads through it. The same table draws a Settings window, opened from the menu bar menu or heed://settings: a tab per group, a field per shortcut that says whether its combination registered, checkboxes and numbers for the rest, and a list per exclusion. The window edits the defaults domain and lets the reload apply the change, so it and defaults write are one path. Closing commits, an Edit menu lets a bundle ID be pasted, and Restore Defaults asks first. New verbs for the same table: heed://set/<key>/<value>, heed://reset/<key>, heed://hotkeys/release and restore, and heed://settings, with --set, --reset, --hotkeys and --settings on the binary. A set value survives the notification round trip whole, slashes included. The README and the site drop every defaults write and make restart pair, and the paragraph on what a command can do says so honestly now that a URL can change a setting.
rbstp
force-pushed
the
settings-window
branch
from
September 27, 2026 13:40
3f31f39 to
38dc888
Compare
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 read its settings at launch and on SIGHUP, so every
defaults writein the README came with amake restart, and the Raycast store review caught the extension's README skipping that step. This removes the step instead.Settings take as written
A key-value observer on the defaults domain reloads the running agent whenever one of its keys changes, from whichever process changed it. The SIGHUP handler is gone;
killall -HUP Heednow just restarts it through KeepAlive, which applies the settings too. A run of writes lands as one reload, 50 ms after the last.One table
Setting.swiftlists every setting with its key, kind, range andConfigfield.Config.loadreads through it, so a key cannot be in the loader and missing from the window or the URL vocabulary. Ranges and defaults are the ones the loader had.The window
Settings… in the menu bar menu, or
heed://settings. A tab per group; a field per shortcut that says whether its combination registered, with the log saying why when it did not; checkboxes and numbers for the rest; a list per exclusion, one entry per line. It edits the defaults domain and lets the reload apply the change, so the window,defaults writeand the URL verbs are one path. Closing commits what was typed, an Edit menu makes paste work in an accessory app, and Restore Defaults asks before wiping everything.The verbs
heed://set/<key>/<value>,heed://reset/<key>,heed://hotkeys/release,heed://hotkeys/restore,heed://settings, and the same as--set,--reset,--hotkeysand--settingson the binary. Asetvalue survives the distributed-notification round trip whole, slashes included; lists are comma-separated, so a pattern with a comma goes through the window.A URL can now change any setting, which the README's paragraph on the trade says plainly: register a combination another app needs, release every shortcut, exclude every window, turn on
verbose. Nothing is read back.Docs
README and the site drop every
defaults writeplusmake restartpair for the window or aheed://set. The Configuration table stays as the key reference forset.Checked
swift testpasses, including round-trip and front-door cases for the new verbs. Installed locally: adefaults writeand aheed://seteach reload the running agent, a shortcut typed in the window re-registers, a change made by URL while a field is focused is not clobbered when that field ends editing. Two adversarial reviews (Opus and Codex) ran on the diff; their findings on the own-write race, edits lost on close, the missing Edit menu, clamped display, list guards and the security paragraph are all in.The Raycast extension's README moves to the new way in the store follow-up once this is released.