{"id":27062374,"url":"https://github.com/aidenlangley/bspcq","last_synced_at":"2025-04-05T15:16:47.166Z","repository":{"id":62560468,"uuid":"451465646","full_name":"aidenlangley/bspcq","owner":"aidenlangley","description":"A user friendly bspc analyzer.","archived":false,"fork":false,"pushed_at":"2022-05-10T03:45:02.000Z","size":253,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-09T02:24:32.361Z","etag":null,"topics":["bspwm","cli","linux"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/bspcq/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aidenlangley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-24T13:00:34.000Z","updated_at":"2023-11-08T21:43:50.000Z","dependencies_parsed_at":"2022-11-03T14:30:30.275Z","dependency_job_id":null,"html_url":"https://github.com/aidenlangley/bspcq","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidenlangley%2Fbspcq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidenlangley%2Fbspcq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidenlangley%2Fbspcq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidenlangley%2Fbspcq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aidenlangley","download_url":"https://codeload.github.com/aidenlangley/bspcq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353750,"owners_count":20925329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bspwm","cli","linux"],"created_at":"2025-04-05T15:16:46.701Z","updated_at":"2025-04-05T15:16:47.150Z","avatar_url":"https://github.com/aidenlangley.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bspcq, q for query\n\n## A `bspc` analyzer (utility for [bspwm](https://github.com/baskerville/bspwm))\n\nThis is a small program that prints a user friendly, visual representation, of\nyour current `bsp` tree.\n\nThe aim is to assist in using `bspwm` so new users have an easier time getting\ninto tiling window managers, and have some toys to play with.\n\nIt's essentially the same as\nrunning:\n\n```sh\nbspc query -M -m \u003cmonitor-name\u003e | jq\n```\n\nExcept there are fewer parameters, a less complex syntax to remember and an\nintuitive visual.\n\n## Installation\n\nI'd recommend just copying the script from the root of this directory, `bspcq`,\nand changing the shebang.\n\n```sh\ngit clone https://github.com/aidenlangley/bspcq\nmv bspcq/bspcq ~/bin/bspcq # or ~/.local/bin/bspcq\nchmod +x ~/bin/bspcq\n```\n\nThen edit the shebang - my shebang:\n\n```sh\n#! /usr/bin/env python3.10\n```\n\nYour shebang might need to be be:\n\n```sh\n#! /usr/bin/env python3\n```\n\n### Dependencies\n\nIn addition, some Python modules are required, as is `xtitle`.\n\n#### [`rich`](https://pypi.org/project/rich/)\n\n`rich` is responsible for the nicely formatted tree.\n\n```\npython -m pip install rich\n```\n\n#### [`xtitle`](https://github.com/baskerville/xtitle)\n\n`xtitle` assists in getting the title name of a node/window in X.\n\nRequires C/C++ development tools, varies by distro.\n\n```\ngit clone https://github.com/baskerville/xtitle\ncd xtitle\nmake \u0026\u0026 make install\n```\n\nI've actually included it here, under contrib, so you can just copy it to `~/bin`.\n\n### Via `pipx`\n\nhttps://pypi.org/project/bspcq/\n\n```sh\npython -m pipx install bspcq\n```\n\n## Upgrade\n\n```sh\npython -m pipx upgrade bspcq\n```\n\n## Usage\n\n```sh\n# Prints the full tree, including output from all monitors.\nbspcq\n```\n\n```sh\n# Provides a simpler view, perfect for finding window class names.\nbspcq -s\n```\n\n```sh\n# Grabs info on all nodes that belong to the specified domain.\nbspcq -M/D/N\n\n# For a simplified view.\nbspcq -M/D/N -s\n```\n\n```sh\n# Passes through a query to `bspc query` and prints our tree, valid identifiers\n# are names, ID's or the address output by `bspc -M/D/N`.\nbspcq -m/d/n \u003cmonitor/desktop/node-identifier\u003e\n```\n\n### Preview\n\n![2022-01-25_02-17_1](https://user-images.githubusercontent.com/684721/150789813-da7d0b56-1762-4bf7-af6b-7d031f779030.png)\n\n![2022-01-25_02-17](https://user-images.githubusercontent.com/684721/150789957-06765616-661b-4486-b69a-a7b570e204e1.png)\n\n### Plans\n\nMy goals currently are to:\n\n- Align `bspcq` as closely as possible with `bspc query`. I would like for\n  `bspcq` to behave almost identically to `bspc query` - it just adds a visual\n  element.\n- Remain as lean as possible. A nice-to-have feature would be 0 reliance on\n  external libraries, so I'd like to remove `rich` and implement a way to display\n  the `tree` myself.\n\nThis was just an afternoon project that's turning into a week long project since\nit's quite a lot of fun!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faidenlangley%2Fbspcq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faidenlangley%2Fbspcq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faidenlangley%2Fbspcq/lists"}