Skip to content

Instantly share code, notes, and snippets.

View mr-linch's full-sized avatar
🚧
Work In Progress

Sasha mr-linch

🚧
Work In Progress
View GitHub Profile
@mr-linch
mr-linch / capture_darwin.py
Last active January 21, 2025 08:04
Make fast screenshot of Mac OS window from Python (using native api bindings, 30 fps on Air M2)
import Quartz as QZ
import Quartz.CoreGraphics as CG
import AppKit as AK
import numpy as np
import numpy.typing as npt
import typing as t
Matcher = t.Callable[[dict[str, t.Any]], bool]