You are not logged in.
I've recently switched to labwc (from LXDE). However, one thing I haven't been able to get to work is the ability to take a screenshot of the window I have focused. I can use "grim" and "slurp" to pick regions of the screen fine, and screenshot an entire display, but there seems to be no way to get a specific window which is not reliant on compositor-specific protocols like swaymsg which labwc doesn't support. Is there another way to make this work?
Last edited by osmarks (2023-04-25 15:11:13)
Offline
Moving to AUR issues (labwc is an AUR package).
Offline
but there seems to be no way to get a specific window which is not reliant on compositor-specific protocols
Correct. This information is only available to the compositor, so you can only get it from the compositor. There's no way around that.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I was unsure if there was a standardized protocol for it: Waybar can at least read my active windows (I think through "wlr_foreign_toplevel_management_unstable_v1", which seems to include setting window coordinates but not getting them) in a slightly less compositor-specific way.
Offline
There is no stable / standardized protocol - even for what waybar does. There are quite a few non-standardized protocols such as the one you note (see the "unstable_v1" in that name), and whether these are supported is entirely compositor specific.
So labwc might provide some way of acheiving your goal, but it would absolutely be a compositor-specific solution which was my point: there is no generic or non-compositor specific way of doing this. So your search should focus on labwc docs or code.
Last edited by Trilby (2023-04-25 12:40:49)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
It looks like there is deliberately nothing beyond the supported protocols, which do not include this, so I wrote a very accursed patch to get the information out of the compositor by IPC. It doesn't obviously break everything horribly so this is fixed I guess.
Last edited by osmarks (2023-04-25 15:12:54)
Offline