Show HN: SpinWin – A macOS menu bar app to visually rotate or spin any window
Posted by dbm5 2 days ago
SpinWin is an open source menu bar app to visually rotate any individual window. You can rotate / spin as many as you want one by one.
I was scrolling reels when one came on where the content creator suggested "turning the phone upside down" for a portion. I was sitting at my mac, and decided to see if I could find something that did this. To my surprise, nothing exists, so I decided to build it.
Turns out macOS doesn't provide any public API to do anything like this, so I wound up using the Accessibility API to move the target window offscreen, where it keeps rendering. Then we capture it's contents with ScreenCaptureKit, and display that on a transparent, borderless overlay window which has a CALayer to rotate it.
It's written in Swift, open source, MIT license, and signed/notarized.
Have fun - would love to hear your comments.
Comments
Comment by gwynforthewyn 1 day ago
Drawing apps do regularly allow for canvas rotation, so I’m sure this’ll turn out to be useful for some class of application that I’m not considering.
Comment by itomato 1 day ago
Comment by loumf 1 day ago
Comment by mortenjorck 1 day ago
Comment by dbm5 1 day ago
Since the target is derived from the union, a display disconnect or resolution change shrinks the desktop and the parked window pops back into view. I listen for display-config changes and re-apply the position.
Comment by mortenjorck 1 day ago
Comment by dbm5 1 day ago
EDIT: private APIs — CGVirtualDisplay / CGVirtualDisplayDescriptor / │ CGVirtualDisplayMode (the same ones BetterDisplay uses)
Comment by 1bpp 23 hours ago
Comment by hollow-moe 1 day ago
Comment by dbm5 1 day ago
Comment by metasim 1 day ago