Skip to content

Add Windows support for Screen observer#18

Open
chicken602 wants to merge 3 commits intoGeneralUserModels:mainfrom
chicken602:main
Open

Add Windows support for Screen observer#18
chicken602 wants to merge 3 commits intoGeneralUserModels:mainfrom
chicken602:main

Conversation

@chicken602
Copy link
Copy Markdown

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

  • Added CaptureBase abstract class with CaptureMac and CaptureWindows backends
  • CaptureWindows uses Win32 APIs via ctypes (no new dependencies)
  • Made pyobjc-framework-Quartz and shapely Mac-only in pyproject.toml and setup.py
  • Added gum --list-apps to discover correct skip_when_visible app names (platform-dependent — exe name on Windows, owner name on Mac)
  • Made DEBOUNCE_SEC, MIN_BATCH_SIZE, MAX_BATCH_SIZE configurable via env vars

Testing

Windows 11, 200% DPI, Python 3.11, Gemini API as OpenAI-compatible backend.

Known issues

Calendar observer disabled — pre-existing ics/tatsu incompatibility with Python 3.10+. TODO comment added with fix path.

- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant