niri v25.08 added window positions to IPC, so waybar actually has the
information stored in json around.
This handles the associated WindowLayoutsChanged IPC message to keep the
position up to date in memory, and adds a couple of format messages to
show the current column, so one can dislpay where we are in the
workspace (in the hope of improving this feeling of being lost...)
Ideally a visual representation of the workspace like the one
illustrated in the PR[1] would be even better but this will probably do
for now.
Link: https://github.com/YaLTeR/niri/pull/1265#issuecomment-2724621758 [1]
This Patch allows the stretching of modules-{left,center,right} as well
add a "expand" flag to AModule. This allows one module to consume the
leftover space.
To allow the left or right modules to fully consume the center, the
changes also include a way to remove the center box (center_)
altogether.