Metadata-Version: 2.2
Name: getactivewindow_x
Version: 0.4.0
Summary: Separate component to get information on the active window in X.
Home-page: https://github.com/user202729/getactivewindow-x
Author: user202729
License: GNU General Public License v3 or later (GPLv3+)
Classifier: Environment :: Plugins
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: python-xlib~=0.29
Requires-Dist: ewmh~=0.1.6

# getactivewindow-x

# Deprecated

maybe use `pywinctl` instead or one of the solutions in https://stackoverflow.com/q/10266281/5267751

See also https://github.com/Kalmat/PyWinCtl/issues/64


Separate component to get information on the active window in X.


### Why?

In an attempt to be portable between operating systems.

The user can install another package that provides the same interface.

### Important note

Use python-xlib fork https://github.com/fransklaver/python-xlib/tree/randr-errors-inherit-xerror to avoid hang.

```bash
pip uninstall python-xlib
pip install git+https://github.com/fransklaver/python-xlib.git@randr-errors-inherit-xerror
```

### Internal details

There's another branch [user202729/getactivewindow-x at spawn-xdotool-xprop-process](https://github.com/user202729/getactivewindow-x/tree/spawn-xdotool-xprop-process)
that uses subprocess, `xdotool` and `xprop`.

### API

Currently there are only these functions.

```python
def active_window_id()->WindowID:
def window_name(window_id: WindowID)->str:
def window_class(window_id: WindowID)->tuple[str, ...]:
```

The window name should not (but may) change if the window ID is constant.

Packages should not rely on `WindowID` type being `int`.
