Skip to main content

json-xwininfo

@readwithai - X - blog - machine-aid reading

Get information about an X11 window in machine-readable JSON. This is similar to the xwininfo information

Installation

You can install this using pipx:

pipx install json-xwinfo

Usage

json-xwininfo

You can information about the currently focused window using:

json-xwininfo --focused

Most programming languages provides facilities to easily parse JSON. For using this information at the moment line you may wish to use the jq.

Alternatives and prior work

This tool is obviously inspired by xwininfo and at the moment wraps this tool and parses the output. This tool usings Xlib. You may prefer to use this library to obtain this information rather than using this tool for more "self-contained" pieces of software.

Motivation

I was experimenting with displaying information at particular positions on the screen - such as the top left corner of the window. The shell code necessary to do this was a little too involved to count as a good idea so I decided to wrap this into tool.

Caveats

Information is partial. At the moment this tool wraps xwininfo and parses the output.

Support

If you find this tool useful you can support it by giving me money on ko-fi. I would suggest a $1 dollar donation if you find this tool useful. This will incentivise me to create similar tools.

You may also like to look at my json-wmctrl which can be used to list and select windows and raise them.

You might like to read some of my writing about the note taking app Obsidian.

About me

I am @readwithai. I make tools related to reading, research and productivity sometimes with Obsidian.

You can follow me on X where I post about tools like this and a range of topics. Or if reading and research sounds interesting you could read my blog.

@readwithai logo

Metadata

Release files for json-xwininfo 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for json-xwininfo 1.1.0
File Size Uploaded Provenance Actions
json-xwininfo-1.1.0.tar.gz 4.2 kB Without provenance Details for json-xwininfo-1.1.0.tar.gz

Release files / json-xwininfo-1.1.0.tar.gz

Download URL json-xwininfo-1.1.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5d674f144a39af21fad95a7f861af01e832fd3e475681bc051bdb0d21fe986ce
BLAKE2b-256 checksum
How to use checksums
78c2547708ed12056cf5138474fb66f3d28a0fde12cd52d77ff952bfd79d5eb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Security for json-xwininfo 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page