A bspc analyzer (utility for bspwm)
This is a small program that prints a user friendly, visual representation, of
your current bsp tree.
The aim is to assist in using bspwm so new users have an easier time getting
into tiling window managers, and have some toys to play with.
It's essentially the same as running:
bspc query -M -m <monitor-name> | jqExcept there are fewer parameters, a less complex syntax to remember and an intuitive visual.
I'd recommend just copying the script from the root of this directory, bspcq,
and changing the shebang.
git clone https://github.com/aidenlangley/bspcq
mv bspcq/bspcq ~/bin/bspcq # or ~/.local/bin/bspcq
chmod +x ~/bin/bspcqThen edit the shebang - my shebang:
#! /usr/bin/env python3.10Your shebang might need to be be:
#! /usr/bin/env python3In addition, some Python modules are required, as is xtitle.
rich is responsible for the nicely formatted tree.
python -m pip install rich
xtitle assists in getting the title name of a node/window in X.
Requires C/C++ development tools, varies by distro.
git clone https://github.com/baskerville/xtitle
cd xtitle
make && make install
I've actually included it here, under contrib, so you can just copy it to ~/bin.
https://pypi.org/project/bspcq/
python -m pipx install bspcqpython -m pipx upgrade bspcq# Prints the full tree, including output from all monitors.
bspcq# Provides a simpler view, perfect for finding window class names.
bspcq -s# Grabs info on all nodes that belong to the specified domain.
bspcq -M/D/N
# For a simplified view.
bspcq -M/D/N -s# Passes through a query to `bspc query` and prints our tree, valid identifiers
# are names, ID's or the address output by `bspc -M/D/N`.
bspcq -m/d/n <monitor/desktop/node-identifier>My goals currently are to:
- Align
bspcqas closely as possible withbspc query. I would like forbspcqto behave almost identically tobspc query- it just adds a visual element. - Remain as lean as possible. A nice-to-have feature would be 0 reliance on
external libraries, so I'd like to remove
richand implement a way to display thetreemyself.
This was just an afternoon project that's turning into a week long project since it's quite a lot of fun!

