skillfed

PyMonCtl

Cross-Platform toolkit to get info on and control monitors connected

pymonctl v0.92 200.3K downloads/30d#9,696 on PyPI5
Permissive license BSD 3 Active released

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 pymonctl

uv

uv add pymonctl

poetry

poetry add pymonctl

Installing 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

Development Status :: 4 - BetaEnvironment :: MacOS XEnvironment :: Win32 (MS Windows)Environment :: X11 ApplicationsIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.9

Tags

monitor control pythondisplay resolution detectionscreen geometry managementmulti-monitor setupbrightness control apicross-platform displaymonitor info query
cross-platformdisplay-controlhardware-interface

More Monitoring packages