felixfung / skippy-xd

A window selector for X11 with Exposé and live preview Alt-Tab effects and more
GNU General Public License v2.0
19 stars 2 forks source link

Filter windows by virtual desktop, window class and/or window state #13

Open felixfung opened 1 year ago

felixfung commented 1 year ago

The core logic should be a fairly straightforward code enhancement with great user value: from a quick look it looks like the code to work on is clientwin_validate_func() and wm_validate_window().

The interesting aspect is how to make the user interface useful. Perhaps through command line parameter to filter only current window focused's class, another parameter for window state, another for virtual desktop.

ArijanJ commented 1 year ago

For the scratchpad problem in #28, I think that if a WM is EWMH compliant, all scratchpad windows should have a desktop number of -1: https://github.com/sagb/alttab/blob/09bc40c21f71c9a70074a9d70ce01404545fd40e/src/win.c#L755

I think that this project handles this idea nicely, it has a switch -d which controls this - from the manpage:

-d NUMBER
default: 0
Show windows belonging to desktops (workspaces, groups). NUMBER must be between 0 and 4:
     0: Current desktop.
       This is default, although in non EWMH-compatible WM, except ratpoison, it's effectively the same as 1.
     1: All desktops.
     2: All desktops, excluding special (-1) one.
       In various EWMH WM this desktop may be designed hidden or containing sticky windows.  In i3, it's "scratchpad".
     3: All desktops, excluding current and special.
     4: Special (-1) desktop only.
felixfung commented 1 year ago

Not sure about what you mean? I think skippy-xd filters away desktop == -1 windows, as well as windows that has skip taskbar hint and paneled windows.

ArijanJ commented 1 year ago

Hmm, there might be a bug somewhere in there then, I think I'll open a separate issue for this.