Feature Request: Allow skipping of windows with app_id or title as a filter

As in title, it will be awesome to have a feature which can allows to skip certain windows while calling next/prev-windows and such commands. Usecase: there are some floating windows which I dont want to switch like sticky notes, some music widget and such

thanks a lot for creation of swayr, its an awesome tool :)

Assigned to
1 year, 9 months ago
1 year, 8 months ago
enhancement swayr

~tsdh 1 year, 9 months ago

Hi, I've just implemented two commands next-matching-window / prev-matching-window on the next branch which take CRITERIA queries defining the windows to be visited. So for example, you can say swayr next-matching-window [tiling workspace=__focused__ app_id="firefox.*"] which will would only consider tiled firefox windows on the very same workspace as the currently focused window.

Right now, multiple criteria are always handled as connected by a logical AND (as does sway itself) but I'm planning to add combinators OR and NOT in the future, see https://todo.sr.ht/~tsdh/swayr/25.

Please give it a try and report back. I think that should fulfill your feature request although the missing disjunction/negation in CRITERIA queries make some conditions inexpressible. But again, that will come when I find the time to implement #25 which I hope will be sooner rather than later.

~isshin 1 year, 9 months ago

thanks for the consideration. So my exact usecase is that I keep a few notes windows which are sticky , and would like to skip them always. having NOT as a criteria will do the once implemented. Guess, I will for it :)

~tsdh REPORTED CLOSED 1 year, 8 months ago

I've released swayr-0.22.0-beta.0 where you can have NOT and OR in criteria queries, see https://sr.ht/~tsdh/swayr/#swayr-commands-criteria.

Register here or Log in to comment, or comment via email.