So I made a macOS thing. It's a fidget spinner, but with a twist.

Made possible thanks to @samhenrigold posting about his own experiments with these private APIs.

Now available on Github! And the center part does not rotate. And the momentum now feels more like the real thing.

https://github.com/grishka/WidgetSpinner

GitHub - grishka/WidgetSpinner: A fidget spinner for your Mac

A fidget spinner for your Mac. Contribute to grishka/WidgetSpinner development by creating an account on GitHub.

GitHub
While it does run on older macOS versions, it glitches a lot on anything 10.x. Not sure why this happens but it might be related to how the window server draws shadows.
Anyway, now that I'm done with this, I'm gonna go back to photo albums in Smithereen :P
@grishka @samhenrigold awesome, thanks for creating and sharing!
@grishka @samhenrigold next challenge is to make the center of the fidget spinner stay still while you spin the window 😁
@Crates @samhenrigold should be easy, didn't think of that, heh
@grishka @Crates take it a step further, prevent the center from spinning but spin the rest of the screen around it
@grishka @Crates (this might force you to disable SIP like I had to do today to hook into the global drag and drop manager)
@grishka @Crates bad experience, can’t recommend it
@samhenrigold @Crates oh this was me today trying to set up censorship bypass tools on my new router
@grishka @samhenrigold How’s that even possible? lmao
@rmasoni @samhenrigold the private API is CGSSetWindowTransform. It allows you to set an arbitrary affine transform on a window. There's also CGSSetWindowWarp that takes a mesh, this is the one Sam is experimenting with, it's used by the system for that genie animation when you minimize a window.
@grishka @samhenrigold Ooh! That makes sense! Thanks for the explanation.
@grishka @samhenrigold is the title bar still completely functional?
@georgemoody @samhenrigold unfortunately not *completely*. The hit testing seems to be broken for dragging, and if you do manage to start dragging it, it would jump like 100 pixels. The buttons do work.
@grishka Oh wow it's just like Wayland. How about doing this with X11, and spinning the whole display?
@tofu gahahaga omg thats so good,, i was working on one using xshape but i really want to spin the display now ​

@grishka @samhenrigold omfg it's so cursed... I love it

Why does this API even exist? What uses it?

@avali @samhenrigold the rotation I'm not sure anything uses (which is why it's glitchy on older OSes), but scaling is used plenty for spaces/expose. The mesh warp is used for the genie animation when minimizing windows and was used for modal sheets in 10.x when the sheet is wider than its parent window.
@grishka @samhenrigold This is so cool! I didn't even realize this was possible until now lol