EWMHlib
Extended Window Manager Hints implementation in Python 3
Decision gist · record as of 2026-08-14
Yes, if you need to control or query EWMH-compliant window managers on X11. The low install friction, permissive license, and active maintenance make it a reasonable choice. However, do not install if you are targeting Wayland or non-X11 systems, or if you need a large community or extensive documentation—the package is small and Beta-stage.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires X11 display server; will not work on Wayland or non-X11 systems.
- python-xlib must be able to connect to an X display.
- Low friction install with only two runtime dependencies (typing-extensions and python-xlib).
License · maintenance · safety
BSD 3 (permissive) — BSD 3 license is permissive, allowing commercial and private use with minimal restrictions—suitable for most projects.
last release 2024-04-17 (849 days) · last repo commit 2026-06-29 · 6 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 161,704 downloads/mo, #10,625 on PyPI
Alternatives
Verify before relying
pip install ewmhlib
import ewmhlib
from ewmhlib import EwmhRoot, EwmhWindow
root = EwmhRoot()
active_window = root.getActiveWindow()
if active_window:
win = EwmhWindow(active_window)- Exact Python version requirements (requires_python field is unspecified in metadata)
- Whether all EWMH-compliant window managers are equally well-supported or if some have known gaps
- Performance characteristics when handling many windows or frequent event polling
What it is and what it does
EWMHlib wraps the Extended Window Manager Hints specification into Python classes that let you query and control X11 window managers without writing raw Xlib code. It provides two main entry points: EwmhRoot for desktop-level operations (active window, workspace management, WM protocols) and EwmhWindow for individual application windows (geometry, state, hints, events). The package also exposes lower-level functions and property constants for advanced use cases.
The library is built on python-xlib and works with EWMH-compliant window managers like GNOME (with X11), KDE, Cinnamon, and many tiling managers. It includes event-handling support for window changes and a Props class organizing all EWMH atoms and hints. However, it explicitly does not work with Wayland, the newer display server used by default in recent GNOME releases.
Use it for
- Automate window positioning, resizing, or state changes (maximize, minimize, fullscreen) in X11 desktop environments
- Monitor active window changes and window events for automation or logging tools
- Query window properties (title, workspace, geometry, hints) for window management utilities
- Build desktop tools that need to interact with the window manager without low-level Xlib boilerplate
- Integrate window control into PyQt or Tkinter applications running on X11
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to control or query EWMH-compliant window managers on X11.
The low install friction, permissive license, and active maintenance make it a reasonable choice. However, do not install if you are targeting Wayland or non-X11 systems, or if you need a large community or extensive documentation—the package is small and Beta-stage.
Install
ewmhlib on PyPI
Before you install
Low friction install with only two runtime dependencies (typing-extensions and python-xlib). Actively maintained with recent commits; however, the package is in Beta status and has a small user base (161704 monthly downloads, position 10625).
Requires X11 display server; will not work on Wayland or non-X11 systems. python-xlib must be able to connect to an X display.
License in practice
BSD 3 license is permissive, allowing commercial and private use with minimal restrictions—suitable for most projects.
Quickstart
pip install ewmhlib
import ewmhlib
from ewmhlib import EwmhRoot, EwmhWindow
root = EwmhRoot()
active_window = root.getActiveWindow()
if active_window:
win = EwmhWindow(active_window)
Verify before relying
- Exact Python version requirements (requires_python field is unspecified in metadata)
- Whether all EWMH-compliant window managers are equally well-supported or if some have known gaps
- Performance characteristics when handling many windows or frequent event polling
Package facts
| License | BSD 3 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagestyping-extensionspython-xlib |
| Maintenance | Actively maintained 849 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 161,704 / month, #10,625 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: 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 |
Evidence: EWMHlib-0.2-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 › “EWMH window manager control”
- EWMHlibQuery and control window managers that implement Extended Window…
- wmctrlwmctrl provides programmatic control over windows in X Window System…
- xlibProvides a pure-Python X11 client library for communicating with X…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also xlib · PyWinBox · python-xlib · wmctrl · glfw · PyGetWindow · keysymdef · screeninfo · PyMonCtl