Back to work

VScreen

Independent project · 2026 · Private build

Background work stays visible, and your screen stays yours

I built VScreen, a macOS menu-bar app that adds a virtual display and mirrors it into a floating, fully interactive window. Pages moved onto the display stay visible to macOS and the browser, so long-running work continues at full speed while the main screen stays free.

The challenge

macOS and Chrome throttle pages hidden behind other windows. Data-collection pages and monitoring dashboards need to stay visible and responsive without occupying the main screen.

My responsibility

  • Created an on-demand virtual display that macOS treats as a real monitor, with resolutions from 1080p to 1440p HiDPI and the rendering cost of each shown before switching.
  • Built a resizable 16:9 Picture-in-Picture window that streams the display with ScreenCaptureKit and stops capturing whenever the window is minimized, closed, or hidden.
  • Made the window interactive: clicks, double clicks, modifier clicks, and smooth trackpad scrolling reach the virtual display as if the user were working on it directly.
  • Restored every window to its position after a restart and kept the display awake, so long-running sessions survive interruptions.

Engineering decisions

CGVirtualDisplay, the private API behind tools such as BetterDisplay and DeskPad, creates a display the system treats as real, which is why the app runs outside the App Store sandbox. ScreenCaptureKit streams frames as IOSurfaces straight to a CALayer at a resolution that follows the window size; CGEvent forwards input, tagging sent events to prevent feedback loops; and the Accessibility API restores windows. At the default resolution, it measured about 29 MB of memory and 1.3% CPU, with no leaks.

SwiftSwiftUIAppKitCGVirtualDisplayScreenCaptureKitCGEventAccessibility APIIOKit