Skip to content

Dim and shrink cursor after idle timeout#85

Open
sat-sat wants to merge 1 commit intofarzaa:mainfrom
sat-sat:feature/dim-cursor-on-idle
Open

Dim and shrink cursor after idle timeout#85
sat-sat wants to merge 1 commit intofarzaa:mainfrom
sat-sat:feature/dim-cursor-on-idle

Conversation

@sat-sat
Copy link
Copy Markdown

@sat-sat sat-sat commented May 6, 2026

Adds an idle state to the Clicky cursor that makes it less visually intrusive when you're not actively moving the mouse.

What it does:

  • After 0.7 seconds of no cursor movement, the cursor fades to 50% opacity and shrinks to 80% of its size
  • When the cursor moves again, it immediately snaps back to full opacity and size with a fast ease-in
  • Applies to all three cursor states: the triangle (idle/responding), waveform (listening), and spinner (processing)

Implementation:
The existing 60fps cursor-tracking timer already polls NSEvent.mouseLocation on every tick. This adds a lastCursorMovementDate timestamp that resets on any movement over 2px. On each tick where the cursor is still, elapsed time is checked and cursorIdleDimFactor is set directly if the threshold is exceeded — the same direct @State mutation pattern used by cursorPosition and the bezier flight animation. The .animation(_, value: cursorIdleDimFactor) modifier on each cursor element handles the easing without needing a separate timer.

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