Open tauchris opened 8 months ago
I think you are right with everything you wrote here. And adding some kind of --desktop none
option would make sense.
I investigated and wrote about this in a similar issue here: https://github.com/jordansissel/xdotool/issues/67#issuecomment-1193573254 from a different perspective for perhaps also addding some kind of --desktop some
option.
As I understand it,
xdotool search
supports filtering of matching windows do a specific desktop... or not filtering by that criteria at all. Not all windows are associated with a specific desktop, however. So, unless I've misunderstood, there is no way to search for unmapped windows or sticky windows (windows that have been set to show on all desktops). The only way to accomplish this is to search for all windows, and manually filter out those windows that are associated with a desktop.Consider this example:
I have one "unmapped" window and one "sticky" window, not shown above. The only way to find those with xdotool is to search for everything, like so:
Note that in the foregoing, there are a ton of windows that are not on any particular desktop-- most of which belong to the window manager. Also note that in each of these cases, there's an error that gets generated, before I'm able to print the desktop value as "-1". Note also that I cannot do
xdotool search --desktop -1 --class .
-- as that does not work. So I'm stuck with a mass of output I don't want or need, and lots of manual work to do, and lots of error messages to get at the information I want.It would be nice if
xdotool search
supported a variant of the--desktop
option that would pick unmapped/sticky windows, and it would also be super-helpful if there was a way to filter out windows owned by the window manager (windows with _NET_WM_STATE that includes _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_SKIP_PAGER)... Not sure how you'd want to present that in the interface, but it shouldn't be super-hard.