Skip to content

feat: shake cursor to find by magnifying the cursor - #2610

Merged
Drakulix merged 1 commit into
pop-os:masterfrom
hojjatabdollahi:hojjat/shake-cursor
Aug 20, 2026
Merged

feat: shake cursor to find by magnifying the cursor#2610
Drakulix merged 1 commit into
pop-os:masterfrom
hojjatabdollahi:hojjat/shake-cursor

Conversation

@hojjatabdollahi

Copy link
Copy Markdown
Contributor

This adds the feature to shake the cursor to locate it.
The algorithm is based on KDE's implementation. Collect the distance the cursor moved in the past 1 second, and divide by the diagonal of the bounding box, if it's more than a threshold, then the user is shaking their cursor.

recording-2026-07-20_16-22-08.mp4
  • This is disabled by default, we need to add to add a toggle for this to accessibility page.

  • I have disclosed use of any AI generated code in my commit messages.
    • If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR.
    • In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.

Drakulix
Drakulix previously approved these changes Jul 21, 2026

@Drakulix Drakulix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems sane to me (and I personally adore the feature, is the maximum unlimited like in KDE?). Probably needs approval from @pop-os/ux though.

Comment thread cosmic-comp-config/src/lib.rs Outdated
@hojjatabdollahi
hojjatabdollahi force-pushed the hojjat/shake-cursor branch 2 times, most recently from 940858e to d230e20 Compare July 21, 2026 16:34
@hojjatabdollahi

Copy link
Copy Markdown
Contributor Author

is the maximum unlimited like in KDE?

It is now!

recording-2026-07-21_10-31-23-trimmed.mp4

I also changed the default values to be closer to KDE's. For example hold the large cursor for 2 seconds before shrinking (it was 1 before).

@git-f0x

git-f0x commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Now we just need SVG cursors 🥹

@hojjatabdollahi

Copy link
Copy Markdown
Contributor Author

Now we just need SVG cursors 🥹

#2659

@Drakulix Drakulix mentioned this pull request Jul 28, 2026
5 tasks
@hojjatabdollahi

Copy link
Copy Markdown
Contributor Author

Do we want to add any of the values as a config? For example sensitivity? Not necessarily in the GUI, but in the config files?

@Drakulix

Copy link
Copy Markdown
Member

@hojjatabdollahi Maria agreed to add this feature, but we want a toggle in the Accessibility->Vision section to disable it (on by default).

I don't think we need any configuration beyond that. Could you make a cosmic-settings PR for this as well?

@Drakulix Drakulix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor thing, but looks good code-wise!

Comment thread src/backend/render/cursor.rs Outdated
@hojjatabdollahi

Copy link
Copy Markdown
Contributor Author

@Drakulix I'm afk till Sunday.

But I do have a draft for settings pop-os/cosmic-settings#2100

Feel free to update any of my PRs, or I will do it as soon as I'm back.

@Drakulix Drakulix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good from the code-side of things. :)

@Drakulix
Drakulix requested review from a team and removed request for a team August 17, 2026 11:40

@leviport leviport left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working great! I like the feature.

@Drakulix
Drakulix merged commit f20de50 into pop-os:master Aug 20, 2026
5 of 6 checks passed
@RafaelKr

Copy link
Copy Markdown

Very helpful, I appreciate it, thank you very much!

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.

5 participants