{ "info": { "author": "CJ Harries", "author_email": "cj@wizardsoftheweb.pro", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Environment :: Console", "Environment :: X11 Applications" ], "description": "``xpynfo``\n~~~~~~~~~~\n\nThis is a simple CLI tool to dump X window info in a tree format.\n\nCurrent version is a proof-of-concept. The API will potentially change drastically.\n\nFeatures\n========\n\n- Uses |anytree|_ to tidy output\n- Uses |xcffib|_ for ``X`` interaction via ``XCB`` Python bindings\n- Provides access to\n\n - |attributes|_\n - |geometry|_\n - |list_properties|_ with properties filled out via |get_properties|_\n\n.. |anytree| replace:: the ``anytree`` package\n.. _anytree: https://pypi.org/project/anytree/\n.. |xcffib| replace:: the ``xcffib`` package\n.. _xcffib: https://github.com/tych0/xcffib\n.. |attributes| replace:: ``XGetWindowAttributes`` info\n.. _attributes: https://tronche.com/gui/x/xlib/window-information/XGetWindowAttributes.html\n.. |geometry| replace:: ``XGetGeometry`` info\n.. _geometry: https://tronche.com/gui/x/xlib/window-information/XGetGeometry.html\n.. |list_properties| replace:: ``XListProperties`` info\n.. _list_properties: https://tronche.com/gui/x/xlib/window-information/XListProperties.html\n.. |get_properties| replace:: ``xcb_get_property`` calls\n.. _get_properties: https://www.systutorials.com/docs/linux/man/3-xcb_get_property/\n\nSystem Dependencies\n===================\n\nThe core features depend on ``libxcb``. |xcffib_docs|_ also mention ``libxcb-render``. I suspect the full list of ``xcb`` components is actually necessary, but I haven't checked from a fresh install yet.\n\nHere's a good way to discover dependencies in the RPM world. You should be able to replace ``dnf`` with ``yum`` on older systems.\n\n.. code:: shell-session\n\n $ sudo dnf install -y dnf-utils --allowerasing\n\n # For a full XCB install, use this as the first line instead\n # UNLISTED_DEPS=($(eval \"echo 'xcb-'{'proto','util-*'}{'','-devel'}\"));\n $ UNLISTED_DEPS=($(eval \"echo xcb-util-renderutil{,-devel}\")); \\\n DEPS=($(\\\n repoquery --requires --resolve python2-xcffib \\\n | awk -F':' '\\\n /^[^:]*:[^:]*$/{ \\\n gsub(\"-[0-9]+$\", \"\", $1); \\\n print $1; \\\n }' \\\n | sort -u \\\n )); \\\n FULL_DEPS=( \"${UNLISTED_DEPS[@]}\" \"${DEPS[@]}\" \"${DEPS[@]/%/-devel}\" )\n eval sudo dnf install \\\n --skip-broken \\\n $(printf \"'%s' \" \"${FULL_DEPS[@]}\")\n\n Package xcb-util-renderutil-0.3.9-10.fc28.x86_64 is already installed, skipping.\n Package xcb-util-renderutil-devel-0.3.9-10.fc28.x86_64 is already installed, skipping.\n Package libxcb-1.13-1.fc28.x86_64 is already installed, skipping.\n Package libxcb-1.13-1.fc28.i686 is already installed, skipping.\n Package python2-2.7.15-1.fc28.x86_64 is already installed, skipping.\n Package python2-cffi-1.11.2-1.fc28.x86_64 is already installed, skipping.\n Package python2-six-1.11.0-3.fc28.noarch is already installed, skipping.\n Package libxcb-devel-1.13-1.fc28.x86_64 is already installed, skipping.\n Package python2-devel-2.7.15-1.fc28.x86_64 is already installed, skipping.\n No match for argument: python2-cffi-devel\n No match for argument: python2-six-devel\n Dependencies resolved.\n Nothing to do.\n Complete!\n\n # Or, for an even simpler full install,\n $ sudo dnf install 'libxcb*' 'xcb*'\n\nI have no idea how to do this in other ecosystems. It should be possible in |debian|_ or |arch|_ with some tweaking.\n\n.. |xcffib_docs| replace:: The ``xcffib`` docs\n.. _xcffib_docs: https://github.com/tych0/xcffib#installation\n.. |debian| replace:: the Debian world\n.. _debian: https://askubuntu.com/questions/80655/how-can-i-check-dependency-list-for-a-deb-package\n.. |arch| replace:: the Arch world\n.. _arch: https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Getting_the_dependencies_list_of_several_packages\n\nInstallation\n============\n\n.. code:: shell-session\n\n $ pip install --user xpynfo\n\nUsage\n=====\n\n.. code:: shell-session\n\n $ export PATH=~/.local/bin:$PATH\n $ which xpynfo\n ~/.local/bin/xpynfo\n $ xpynfo --version\n xpynfo \n $ xpynfo --help\n < dumps all the help >\n $ xpynfo \\\n --recurse \\\n --use-names \\\n --style AsciiStyle \\\n --max-depth 1 \\\n --properties \\\n $(xprop | awk '/WM_CLIENT_LEADER/{ print strtonum($NF); }')\n # Note: you have to click a window to populate xprop\n 106954753: Sublime Text\n | Properties:\n | WM_CLASS: ['sublime_text', 'Sublime_text']\n | WM_CLIENT_LEADER: 106954753\n | WM_CLIENT_MACHINE: gxc-fedora-28.wotw\n | WM_COMMAND: sublime_text\n | WM_ICON_NAME: sublime_text\n | WM_LOCALE_NAME: en_US.UTF-8\n | WM_NAME: Sublime Text\n | WM_NORMAL_HINTS: \n | WM_PROTOCOLS: ['WM_DELETE_WINDOW', 'WM_TAKE_FOCUS', '_NET_WM_PING']\n | _NET_WM_ICON_NAME: sublime_text\n | _NET_WM_NAME: Sublime Text\n | _NET_WM_PID: 637\n | _NET_WM_USER_TIME_WINDOW: 106954754\n +-- 106954754\n\n\n\n(Very Basic) Documentation\n==========================\n\n.. code::\n\n usage: xpynfo [-h] [-V] [-r] [-d MAX_DEPTH] [-a] [-g] [-p] [-n]\n [-s {AsciiStyle,ContRoundStyle,ContStyle,DoubleStyle}]\n [window_id]\n\n A tool to examine various pieces of X info. Without options the command simply\n prints the window id.\n\n positional arguments:\n window_id Specify the window ID; default is the screen's root\n window\n\n optional arguments:\n -h, --help show this help message and exit\n -V, --version Displays the package version and exits\n\n Scope Control:\n Options to control the scope of the calls xpynfo makes\n\n -r, --recurse Also query children of the given ID recursively\n -d MAX_DEPTH, --max-depth MAX_DEPTH\n Limit the depth of recursion\n\n X Calls:\n Options to add X information\n\n -a, --attributes Add XWindowAttributes info to output\n -g, --geometry Add XGetGeometry info to output\n -p, --properties Add XListProperties combined with parsed XGetProperty\n info to output\n\n Style:\n Options to tweak output look\n\n -n, --use-names Add _NET_WM_NAME or WM_NAME (when available) to output\n -s {AsciiStyle,ContRoundStyle,ContStyle,DoubleStyle}, --style {AsciiStyle,ContRoundStyle,ContStyle,DoubleStyle}\n Set the anytree rendering style\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wizardsoftheweb/xpynfo#readme", "keywords": "xlib,xcb,xorg", "license": "ISC", "maintainer": "", "maintainer_email": "", "name": "xpynfo", "package_url": "https://pypi.org/project/xpynfo/", "platform": "", "project_url": "https://pypi.org/project/xpynfo/", "project_urls": { "Homepage": "https://github.com/wizardsoftheweb/xpynfo#readme", "Issue Tracker": "https://github.com/wizardsoftheweb/xpynfo/issues" }, "release_url": "https://pypi.org/project/xpynfo/0.0.0/", "requires_dist": [ "pytest-runner", "anytree", "xcffib" ], "requires_python": "", "summary": "A handy, pretty-printing X window metadata CLI", "version": "0.0.0" }, "last_serial": 3907531, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "ee6335ff7060b09697f43cb5fcd99c46", "sha256": "c0b46033bd624bf59b61d3bad3ad222580446af4a06e4d138d39b2dec0055d6b" }, "downloads": -1, "filename": "xpynfo-0.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ee6335ff7060b09697f43cb5fcd99c46", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16851, "upload_time": "2018-05-29T04:03:06", "url": "https://files.pythonhosted.org/packages/dc/33/45ce7b7e8efacbcd79b3290b87839f62271b1e03247f402f3f8b64a2b53e/xpynfo-0.0.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ee6335ff7060b09697f43cb5fcd99c46", "sha256": "c0b46033bd624bf59b61d3bad3ad222580446af4a06e4d138d39b2dec0055d6b" }, "downloads": -1, "filename": "xpynfo-0.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ee6335ff7060b09697f43cb5fcd99c46", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16851, "upload_time": "2018-05-29T04:03:06", "url": "https://files.pythonhosted.org/packages/dc/33/45ce7b7e8efacbcd79b3290b87839f62271b1e03247f402f3f8b64a2b53e/xpynfo-0.0.0-py2.py3-none-any.whl" } ] }