hideIt.sh icon indicating copy to clipboard operation
hideIt.sh copied to clipboard

Improve window search

Open tadly opened this issue 6 years ago • 4 comments

Currently only WM_NAME will be taken into account while identifying a window. A unique match is not guarantied and falling back to the first match out of the whole set is likely to be wrong.

I'd like to expand the search by at least WM_CLASS for additional filtering.

tadly avatar Jul 19 '17 11:07 tadly

Yep, if I were you, I would add id or instance or even title with a regex matching O:)

rotsix avatar Jul 21 '17 16:07 rotsix

title is what will be used right now (probably should change the cli naming for that).

I'm still fiddling with xdotool search but it's just not doing what I'd expect it to. e.g. open a nautilus window. class will be Nautilus while instance will be nautilus.

Doing xdotool search --class 'nautilus' I'd expect no mach, yet I get one.

I just always get more results than I'd expect and haven't found a proper/nice way of doing it :/

tadly avatar Jul 21 '17 16:07 tadly

I started digging again and it's actually a somewhat strange search implementation within xdotool which doesn't allow to combine class, instance and title searches with different search-terms.

There's an issue where I added my 2 cents. Let's see where this'll go.

Until than I'll try and work around it using multiple search requests somehow :)

tadly avatar Aug 31 '17 08:08 tadly

This took way to long to implement ':D But here we go (I hope), better search -> 665c0bd981bdfa51278becc49d9925a0208824fc

I'll still leave that one open as the implementation is just a workaround and I want to see what xdotool will do as he isn't happy with his implementation either :)

tadly avatar Aug 31 '17 16:08 tadly