Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Tips¶
PyGetWindow does not support Linux currently.
Installation¶
pip3 install pyobjc-framework-quartz pygetwindowimport pygetwindow as pygw---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
<ipython-input-1-d13e25ae8407> in <module>
----> 1 import pygetwindow as pygw
~/.local/lib/python3.7/site-packages/pygetwindow/__init__.py in <module>
346 else:
347 raise NotImplementedError(
--> 348 "PyGetWindow currently does not support Linux. If you have Xlib knowledge, please contribute! https://github.com/asweigart/pygetwindow"
349 )
NotImplementedError: PyGetWindow currently does not support Linux. If you have Xlib knowledge, please contribute! https://github.com/asweigart/pygetwindowPyGetWindow.getAllTitles¶
PyGetWindow.getWindowGeometry¶
Get the geometry information (x, y, w, h) of a window,
where (x, y) is the coordinate of the upper-left pixle of the window
and w and h are the width and height of the window.
The bounding box of the window can be calculated as (x, y, x + w, y + h).