{"id":25995304,"url":"https://github.com/talwrii/json-wmctrl","last_synced_at":"2026-02-25T06:39:30.923Z","repository":{"id":279103823,"uuid":"937737816","full_name":"talwrii/json-wmctrl","owner":"talwrii","description":"List X windows in JSON from the command-line","archived":false,"fork":false,"pushed_at":"2025-04-19T04:33:18.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-24T23:54:15.607Z","etag":null,"topics":["cli","json","wmctrl","x11"],"latest_commit_sha":null,"homepage":"https://readwithai.substack.com/p/my-productivity-tools","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/talwrii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-23T19:24:54.000Z","updated_at":"2025-04-23T03:39:46.000Z","dependencies_parsed_at":"2025-07-14T18:32:40.015Z","dependency_job_id":"b4e46601-90c4-4f8a-9908-cfb517ac51d2","html_url":"https://github.com/talwrii/json-wmctrl","commit_stats":null,"previous_names":["talwrii/json-wmctrl"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/talwrii/json-wmctrl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talwrii%2Fjson-wmctrl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talwrii%2Fjson-wmctrl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talwrii%2Fjson-wmctrl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talwrii%2Fjson-wmctrl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/talwrii","download_url":"https://codeload.github.com/talwrii/json-wmctrl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talwrii%2Fjson-wmctrl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29812622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T05:36:42.804Z","status":"ssl_error","status_checked_at":"2026-02-25T05:36:31.934Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","json","wmctrl","x11"],"created_at":"2025-03-05T15:26:40.168Z","updated_at":"2026-02-25T06:39:30.909Z","avatar_url":"https://github.com/talwrii.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSON wmctrl\nThis is a partial reimplementation of wmctrl, the linux tool to interact with windows, but supports JSON output for more subtle control.\n\nAt the moment, this only supports window listing because that is all I needed. The syntax is not compatible with the original wmctrl.\n\n# Motivation\nI use the wmctrl tool to raise windows like so `[[wmctrl]] -x -a \"Firefox\"`. However, this does not work well if you have multiple windows. I wanted to use wmctrl to get all firefox windows and toggle between them. But the output from wmctrl was difficult to parse.\n\n# Usage\n`json-wmctrl` will output all top level windows in JSON.\n\nYou can search by class name with `json-wmctrl --class \"Firefox\"` for example (this support regular expressions).\n\nThere is a flag `--next-unfocused` which will output just the next unfocused window.\nThis can be used together with `wmctrl -i -a` and `jq` to cycle focus through windows.\n\n# Alternatives and prior work\nThis uses the Xlib python library, which you could use directly. See [this stackoverflow post on the topic](https://stackoverflow.com/questions/52545937/how-can-i-list-all-open-x11-windows-on-gnu-linux-from-a-python-script).\n\nThis [C++ command line tool by DarkMaguz](https://github.com/DarkMaguz/SimpleWMCtrl) implements this feature. But it is not easy to install like pip programs.\n\nThe command-line tool [jc](https://github.com/kellyjonbrazil/jc) is designed to convert the output of a number of command-line tools to `JSON`. It does not support `wmctrl` at the moment, and this tool contains additional functionality, but support could be easily added and may be added in the future.\n\n# About me\nI am @readwithai. I make tools for reading and agency sometimes in Obsidian and occassionally write about these things. I also have a side-line in small useful tools.\n\nIf any of that sounds useful, you can follow me on [X](https://x.com/readwithai). I often post about command-line hacks and tools here. You can also follow me on my blog (https://readwithai.substack.com).\n\nAlso you could read with [review of note taking with Obsidian](https://readwithai.substack.com/p/note-taking-with-obsidian-much-of).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalwrii%2Fjson-wmctrl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftalwrii%2Fjson-wmctrl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalwrii%2Fjson-wmctrl/lists"}