Add Windows support for Screen observer#18
Open
chicken602 wants to merge 3 commits intoGeneralUserModels:mainfrom
Open
Add Windows support for Screen observer#18chicken602 wants to merge 3 commits intoGeneralUserModels:mainfrom
chicken602 wants to merge 3 commits intoGeneralUserModels:mainfrom
Conversation
- Extracted macOS-specific Quartz and Shapely logic into a modular CaptureMac backend. - Implemented native Windows support in CaptureWindows using ctypes and Win32 APIs. - Refactored Screen observer to be platform-agnostic and avoid Mac-only imports on Windows. - Optimized dependencies with platform markers for Quartz and Shapely. - Added missing dependencies (aiohttp, bs4, ics, persist-queue) and resolved tatsu compatibility issues. - Documented pre-existing Calendar observer incompatibility with Python 3.10+.
…ng configuration - Added platform-specific capture (Quartz for Mac, Win32 for Windows) - Added --list-apps flag for visible application discovery - Added support for MIN_BATCH_SIZE, MAX_BATCH_SIZE, and DEBOUNCE_SEC env vars - Resolved Python 3.10+ compatibility by disabling Calendar observer - Made Mac-specific dependencies conditional in pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GUM fails to install on Windows due to macOS-only dependencies. This PR makes the Screen observer fully functional on Windows while preserving existing Mac behavior unchanged.
Changes
CaptureBaseabstract class withCaptureMacandCaptureWindowsbackendsCaptureWindowsuses Win32 APIs viactypes(no new dependencies)pyobjc-framework-QuartzandshapelyMac-only inpyproject.tomlandsetup.pygum --list-appsto discover correctskip_when_visibleapp names (platform-dependent — exe name on Windows, owner name on Mac)DEBOUNCE_SEC,MIN_BATCH_SIZE,MAX_BATCH_SIZEconfigurable via env varsTesting
Windows 11, 200% DPI, Python 3.11, Gemini API as OpenAI-compatible backend.
Known issues
Calendar observer disabled — pre-existing
ics/tatsuincompatibility with Python 3.10+. TODO comment added with fix path.