wmctrl
A tool to programmatically control windows inside X
Decision gist · record as of 2026-08-14
Yes, if you are working on X11-based systems and need programmatic window control. The low install friction, permissive MIT license, stable status, and zero known vulnerabilities make it a safe choice. However, it is only useful on X Window System environments; it will not work on Windows or macOS without an X server.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires X Window System and the underlying wmctrl binary to be installed on the target system.
- Low install friction with a single lightweight dependency (attrs).
- Maintenance is dormant—last release was 2023-09-16 and last commit 2024-09-03—but marked Production/Stable, suggesting the package is feature-complete rather than abandoned.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute wmctrl with minimal restrictions, making it safe for both open-source and commercial projects.
last release 2023-09-16 (1063 days) · last repo commit 2024-09-03 · 12 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 206,972 downloads/mo, #9,559 on PyPI
Alternatives
Verify before relying
pip install wmctrl
import wmctrl
windows = wmctrl.Window.list()- Full scope of window management operations supported beyond basic query and manipulation.
- Whether attrs is used only at install time or as a runtime dependency.
What it is and what it does
wmctrl is a Python wrapper around the X Window System's window management capabilities. It lets you programmatically interact with windows on X-based desktops—querying window lists, moving and resizing windows, and manipulating window properties—without manual GUI interaction. The package depends only on attrs and supports Python 2.7 and Python 3.8 through 3.12.
It is most useful in automation scripts, testing frameworks, and desktop tools that need to control or inspect window state. Because it targets X Window System specifically, it is not portable to Windows or macOS without a compatible X server. The dormant maintenance status reflects that the package is stable and feature-complete rather than actively developed, but it remains usable on systems where X11 is the window manager.
Use it for
- Automate window positioning and sizing in X11-based desktop testing or CI/CD pipelines.
- Build desktop automation scripts that manage application windows programmatically.
- Query and monitor active windows in X11 environments for system administration.
- Integrate window control into Python-based window managers or tiling utilities.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are working on X11-based systems and need programmatic window control.
The low install friction, permissive MIT license, stable status, and zero known vulnerabilities make it a safe choice. However, it is only useful on X Window System environments; it will not work on Windows or macOS without an X server.
Install
wmctrl on PyPI
Before you install
Low install friction with a single lightweight dependency (attrs). Maintenance is dormant—last release was 2023-09-16 and last commit 2024-09-03—but marked Production/Stable, suggesting the package is feature-complete rather than abandoned.
Requires X Window System and the underlying wmctrl binary to be installed on the target system.
License in practice
MIT license is permissive; you can use, modify, and distribute wmctrl with minimal restrictions, making it safe for both open-source and commercial projects.
Quickstart
pip install wmctrl
import wmctrl
windows = wmctrl.Window.list()
Verify before relying
- Full scope of window management operations supported beyond basic query and manipulation.
- Whether attrs is used only at install time or as a runtime dependency.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=2.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageattrs |
| Maintenance | Dormant 1,063 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 206,972 / month, #9,559 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: wmctrl-0.5-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “programmatic window management”
- wmctrlwmctrl provides programmatic control over windows in X Window System…
- PyGetWindowPyGetWindow provides functions to query, identify, and control…
- libtmuxlibtmux provides a typed Python API to control tmux (the terminal…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also PyGetWindow · PyWinBox · EWMHlib · PyAutoGUI · xlib · pylnk3 · uiautomation · office-word-mcp-server · glfw