baskerville / bspwm

A tiling window manager based on binary space partitioning
BSD 2-Clause "Simplified" License
7.72k stars 415 forks source link

Query desktop, monitor of window by window ID #761

Closed lf- closed 6 years ago

lf- commented 6 years ago

I can't seem to find a simple way of getting desktop, and monitor IDs given a window/node ID (the one from xdo seems to be the node id as well). Digging through the source code, I found locate_window(xcb_window_t win, coordinates_t *loc, which seems like almost exactly what I want, but with further grepping, I couldn't seem to find anything exposing it through the bspc interface.

Am I missing something? Or is this a shortcoming of the tools available over the bspc interface? I also went digging through the output of wm -d and couldn't seem to find anything listing the nodes on each desktop or monitor.

baskerville commented 6 years ago

bspc query -{M,D} -n <node_id>