Skip to content

feat(agent): numbers on the windows while the modifier is held, and a mark of its own - #26

Merged
rbstp merged 1 commit into
masterfrom
feat/window-numbers-and-mark
Sep 7, 2026
Merged

rbstp merged 1 commit into
masterfrom
feat/window-numbers-and-mark

Conversation

@rbstp

@rbstp rbstp commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Three things, all visible from the menu bar.

Window numbers

Hold the modifier the numbered shortcuts are registered under — ⌃⌘ by default — and each window
in ring order gets its number drawn on it, so the digit to press is read off the screen rather
than counted along it. Let go and they are gone. On by default; Show Window Numbers in the
right-click menu turns them off, and windowNumbersDelayMs sets how long the hold has to be
before they appear (100 ms, short enough to feel immediate, long enough that a shortcut typed at
speed does not flash them).

A number goes in the middle of the largest part of its window that nothing covers, not the plain
centre. The centre is wrong often enough to matter: a maximised browser with a terminal parked
over it keeps its edges showing, so it stays in the ring, but its centre is under the terminal —
the badge would sit on the terminal and name the browser. It also keeps a dialog's number off its
parent's.

Pointer focus is suppressed while the numbers are up. The next keystroke is going to pick a
window; following the pointer first would move focus somewhere else and renumber the rest.

The numbers redraw after a focus shortcut and after a Space or display change, and are taken away
if the ring cannot be built. One ring build is in flight at a time with at most one more
remembered, so holding a shortcut down cannot queue a build per repeat on the queue the shortcuts
themselves need. A watchdog covers the case where the key release is never delivered — secure
event input takes the keyboard away from every monitor, so letting go inside a password field
sends nothing.

A mark of its own

The old icon was cursorarrow.motionlines, which said "mouse" when Heed had grown into window
switching, directional focus and now these numbers. The new one is drawn in code: what has your
attention, and the four ways focus can leave it. Filled core while Heed is on, empty while it is
off, so the switch position shows by shape as well as by the dimming, which also stands for
"no Accessibility permission".

The geometry lives once in HeedCore.glyphPath and is shared by the menu bar item and the
iconset renderer, so the two cannot drift. Tools/make-icon.swift becomes a heed-icon SwiftPM
target, since the Swift interpreter takes only one file and the alternative was two copies of the
same path. Proportions are ninths, so an 18 pt menu bar image lands its straight edges on whole
pixels at 1x.

Rename

FFMCore was the repository's old name. It is HeedCore now, along with its test target.


make check-package passes and 254 tests pass. Verified live: the numbers appear ~150 ms after
the modifier goes down, on the right windows, and clear on release.

Not in here, on purpose: Shortcut Modifier in the menu always refuses, because claim
re-registers combinations Heed itself already holds and because two shortcuts can rewrite onto the
same combination. That is a bug in the hotkey-claiming path, unrelated to any of the above, and
follows in its own PR.

… mark of its own

- Holding the numbered shortcuts' modifier draws each window's ring number on it, so the
  digit to press is read rather than counted. On by default; `windowNumbers` and a menu
  item turn it off, `windowNumbersDelayMs` sets how long the hold has to be.
- A number goes in the middle of the largest part of its window that nothing covers,
  rather than the plain centre, which lands on whatever buried the window and then names
  the wrong one.
- Pointer focus is suppressed while the numbers are up: the next keystroke is going to
  pick a window, and following the pointer first would move focus somewhere else.
- Replaces the SF Symbol icon with a mark drawn in code: what has your attention and the
  four ways focus can leave it. One description in `HeedCore`, shared by the menu bar
  item and the iconset, so the two cannot drift apart.
- Renames the `FFMCore` module to `HeedCore`, after the repository's old name.
@rbstp
rbstp enabled auto-merge (squash) September 7, 2026 03:22
@rbstp
rbstp disabled auto-merge September 7, 2026 03:23
@rbstp
rbstp merged commit 247d7a7 into master Sep 7, 2026
1 check passed
@rbstp
rbstp deleted the feat/window-numbers-and-mark branch September 7, 2026 03:24
rbstp added a commit that referenced this pull request Sep 11, 2026
…creenshots (#38)

The extension icon still carried the cursor mark the app dropped in #26; it is
now rendered by the IconTool from the same Glyph.swift the app icon and menu
bar item use, so the three cannot drift again. Renamed to icon.png because
Raycast caches an extension's icon by path and kept showing the old one.

The screenshots are retaken with the new icon: the root search, the Focus
Window list, and Focus Window with its action panel open. The last replaces a
"focus window" search that showed other extensions' commands alongside ours,
which the store guidelines discourage.

@raycast/api moves from 2.2.0 to 2.3.0, the current release.
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.

1 participant