PyMonCtl
Cross-Platform toolkit to get info on and control monitors connected
What it is and what it does
PyMonCtl is a cross-platform Python library for querying and controlling connected monitors. It abstracts over Windows VCP MCCS, Linux Xlib/xrandr, and macOS pmset to provide a unified interface for reading monitor properties (size, position, frequency, color depth, DPI, scale, orientation, brightness, contrast) and changing them (repositioning, resizing, rotating, adjusting brightness). It also includes a watchdog thread that can track monitor plug/unplug events and property changes, notifying registered listeners.
The library is designed for developers building multi-monitor-aware applications—window managers, display configuration tools, or any software that needs to detect or control the display layout. Most methods work across all three platforms, though some features (like brightness control on Windows) require specific hardware support (VCP MCCS), and some behaviors differ by OS (e.g., Linux allows overlapping monitors while Windows does not).
Use it for:
- Detect which monitor a window is on and query its properties for responsive UI layout.
- Automatically arrange multiple monitors into a known configuration on startup or when monitors are plugged in.
- Build a display settings utility that lets users change resolution, orientation, or brightness without OS dialogs.
- Monitor for hot-plug events in a multi-monitor setup and trigger reconfiguration callbacks.
- Query DPI and scale to adapt rendering or font sizes to the actual display.
- Set a monitor as primary or reposition displays programmatically in a headless or automated environment.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyMonCtl provides cross-platform Python access to monitor information and control—querying resolution, position, brightness, and orientation, and setting display modes and geometry across Windows, Linux, and macOS.
Yes, if you need cross-platform monitor control. The package is actively maintained, has no known vulnerabilities, and offers a unified API across Windows, Linux, and macOS. Install friction is low. Be aware that some methods depend on OS-specific hardware support (e.g., VCP MCCS on Windows) and may return None if unavailable; test on your target platforms before relying on brightness or contrast control.
Install
pymonctl on PyPI
pip
pip install pymonctluv
uv add pymonctlpoetry
poetry add pymonctlInstalling PyMonCtl
Before you install
Low install friction with a pure-Python wheel. Maintenance is active with a recent commit in June 2026. Runtime dependencies are platform-specific (pyobjc for macOS, pywin32 for Windows, python-xlib and ewmhlib for Linux), so actual install weight depends on your OS.
License in practice
BSD 3 is permissive and poses no significant restriction on use, modification, or distribution in most contexts.
Quickstart
pip install pymonctl
import pymonctl as pmc
monitors = pmc.getAllMonitors()
for mon in monitors:
print(mon.name, mon.size, mon.position)
Platform-specific system libraries required: Xlib/xrandr on Linux, VCP MCCS support on Windows for some features, pmset on macOS. Some methods return None if the underlying OS capability is unavailable.
Verify before relying
- Whether all advertised monitor control methods work reliably on all three platforms without additional system configuration.
- Real-world stability of the watchdog thread for long-running monitor change detection.
- Performance impact of the 0.5-second default watchdog interval on systems with many monitors or frequent changes.
Package facts
| License | BSD 3 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — typing-extensions, pyobjc, python-xlib, ewmhlib, pywin32 |
| Maintenance | actively maintained — 844 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 200,258/month — #9,696 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: PyMonCtl-0.92-py3-none-any.whl
Keywords: screen, display, monitor, control, geometry, size, position, frequency, scale, orientation, screen-size, mouse-position
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
PyWinBoxPyWinBox manages window positions, sizes, and…
permissive · top 15,000 on PyPI
screeninfoDetects and reports the location, dimensions,…
permissive · top 5,000 on PyPI
mssCaptures screenshots from one or all monitors…
permissive · top 5,000 on PyPI
pygletpyglet is a cross-platform windowing and…
unclear · top 5,000 on PyPI
EWMHlibQuery and control window managers that…
permissive · top 15,000 on PyPI
mozsystemmonitorMonitors system resource usage by wrapping…
copyleft · top 15,000 on PyPI
pywizlightA Python library and CLI tool for discovering…
permissive · top 15,000 on PyPI
xlibProvides a pure-Python X11 client library for…
copyleft · top 15,000 on PyPI
PyMsgBoxPyMsgBox provides JavaScript-like message box…
copyleft · top 5,000 on PyPI