No `Workspace::leaves` method
I60R opened this issue · comments
I60R commented
This exists in Python's i3ipc
and returns a Vec
over windows assigned to workspace
Madhur Ahuja commented
Python's module calculates it and exposes it as method. There is no inbuilt method in i3 protocol to retrieve all the leaves of all workspaces.
I60R commented
Ok
let mut workspaces: Vec<_> = outputs.as_slice().iter()
.flat_map(|outputs| outputs.nodes.as_slice())
.filter(|workspace| workspace.name.as_deref() != Some("__i3_scratch"))
.collect();
did the job