You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a solicitation for comments before I make a PR:
For my window manager, I have made a wrapper for python-xlib that adds a lot of convenience syntax sugar stuff. This does a lot of monkey patching, and I'd like to contribute this back to python-xlib as added methods to the core classes instead. None of this changes existing functionality, it just adds.
In particular, property access to windows is greatly simplified by having windows work as dictionaries of their properties, supporting all the usual operations (keys(), items(), in, win[name] = value etc). The dictionary keys are the python string equivalents of the ATOM:s.
Values are converted to/from python equivalents as needed to be convenient: WINDOW are returned as Xlib.xobject.drawable.Window objects, ATOMs, KEYCODEs and XCONSTs as python strings, STRINGs as bytess. Properties with length != 1 are converted to/from lists of the corresponding values.
I forsee some of these changes to be more easily accepted than other ones, so please feel free to browse through the above link and write here what you like and dislike!
The text was updated successfully, but these errors were encountered:
Heyas!
This is a solicitation for comments before I make a PR:
For my window manager, I have made a wrapper for python-xlib that adds a lot of convenience syntax sugar stuff. This does a lot of monkey patching, and I'd like to contribute this back to python-xlib as added methods to the core classes instead. None of this changes existing functionality, it just adds.
In particular, property access to windows is greatly simplified by having windows work as dictionaries of their properties, supporting all the usual operations (keys(), items(), in, win[name] = value etc). The dictionary keys are the python string equivalents of the ATOM:s.
Values are converted to/from python equivalents as needed to be convenient:
WINDOW
are returned asXlib.xobject.drawable.Window
objects,ATOM
s,KEYCODE
s andXCONST
s as pythonstring
s,STRING
s asbytes
s. Properties with length != 1 are converted to/fromlist
s of the corresponding values.I forsee some of these changes to be more easily accepted than other ones, so please feel free to browse through the above link and write here what you like and dislike!
The text was updated successfully, but these errors were encountered: