--- id: ewmhlib version: "0.2" license: BSD 3 license_treatment: permissive maintenance: active --- # EWMHlib — Extended Window Manager Hints implementation in Python 3 License: permissive · Maintenance: active · Downloads: 161.7K/mo ## 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 above — verify before relying. Query and control window managers that implement Extended Window Manager Hints (EWMH) standards, providing access to root and application window properties, hints, protocols, and events through python-xlib. 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 pip install ewmhlib uv add ewmhlib poetry add ewmhlib ## Installing EWMHlib 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). 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) Requires X11 display server; will not work on Wayland or non-X11 systems. python-xlib must be able to connect to an X display. 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: unspecified - Install friction: low - Maintenance: active - Downloads: 161.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags EWMH window manager control, X11 window hints python, window manager queries, EWMH compliant window control, python-xlib window properties, X11 window events handling, window manager hints management, x11-desktop, window-management [View on SkillFed](https://skillfed.io/packages/ewmhlib) · [View on PyPI](https://pypi.org/project/ewmhlib/)