7 ms·
This is so cool, thanks for sharing! Having this on a Mac would be great but I understand that this might be a huge undertaking :)
by alkh 1y ago
This is so cool, thanks for sharing! Having this on a Mac would be great but I understand that this might be a huge undertaking :)
- mmulet 1y agoI definitely want to make a macOS version, but I haven’t even looked into it yet. So, I don’t know the level of hacking required. It definitely doesn’t sound like anything Apple would have an api for, so it would probably be a vnc or accessibility api trick.
- krackers 1y agoI think there is an API (that was added with sidecar) to create a virtual display. So at best you could retrieve the framebuffer and then display that. I don't think there is an easy exposed way to get per-window information, aside from doing a screencapture (which likely would not work if you also wanted to hide the window).
- mmulet 1y agoInteresting… do you have a link to the docs? The easiest thing prob would be to set the window to be fullscreen, but on that virtual display. That would accomplish per window screen capture.
- krackers 1y agoIt's a private API CGVirtualDisplay, but mostly well reverse engineered. Here's one example I found of a wrapper library https://github.com/enfp-dev-studio/node-mac-virtual-display/blob/main/src/virtual_display.mm https://github.com/enfp-dev-studio/node-mac-virtual-display/...
- mmulet 1y ago100. Thanks!