8000 Let the effect stay up as long as its user needs it by dominion525 · Pull Request #20 · dominion525/blip · GitHub
[go: up one dir, main page]

Skip to content

Let the effect stay up as long as its user needs it - #20

Merged
dominion525 merged 1 commit into
mainfrom
effect-duration
Sep 7, 2026
Merged

dominion525 merged 1 commit into
mainfrom
effect-duration

Conversation

@dominion525
Copy link
Copy Markdown
Owner

Summary

The effect ended after a fixed 1.2 seconds. That is right for most of the time, but it is a guess about how long someone needs to find their cursor, and it is the same guess on a laptop screen as on a projector.

The duration is now a setting: 0.1 to 5.0 seconds in tenths, with 1.2 still the default. Alongside it is an option to keep showing until the pointer is used, for people who would rather end it themselves than wait out a timer.

Waiting on the pointer ends in two ways. The cursor being moved and then set down is decided by BlipCore.DismissOnRest, a pure state machine: movement under 12 points is the drift of a hand resting on a trackpad and does not count, and moving again restarts the wait, so a sweep that pauses partway does not take the effect away mid-sweep. A press of any mouse button ends it outright.

Key presses deliberately do not end it. A key says nothing about where the cursor is, so it would end the effect while its user is still looking for it. A global monitor also receives key events only for an app trusted for accessibility, which is more than a tool that draws a spotlight should hold.

No new permission is required. The cursor position is polled through NSEvent.mouseLocation and mouse events need none of their own. The click is watched with a global monitor of its own rather than by widening the double-tap event tap, which would change what that judges.

Verified on hardware: the cursor coming to rest and a click both end the effect, and a key press does not.

🤖 Generated with Claude Code

- Offer 0.1 to 5.0 seconds in tenths, and an option to keep showing until the pointer is used; the default of 1.2 seconds is unchanged
- Store the choice as seconds in UserDefaults, with zero standing for waiting on the pointer, which no duration in range can collide with
- End the wait when the cursor is moved and set down, decided by the pure state machine in BlipCore.DismissOnRest, or when a mouse button is pressed
- Watch the click with a global monitor of its own rather than widening the double-tap event tap, which would change what that judges
- Leave key presses out. A key says nothing about where the cursor is, so it ends the effect while its user is still looking; and a global monitor receives keys only for an app trusted for accessibility, which is more than a tool that draws a spotlight should hold
- No new permission: the cursor position is polled and mouse events need none

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dominion525
dominion525 merged commit 3bcb2ac into main Sep 7, 2026
1 check passed
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

0