Raise windows while cycling through WindowList

Hi all - I’m a long-time fvwm user, but am new to the forums.

I’ve been using the built-in Alt-Tab key binding with default SelectOnRelease behavior. What I would like to know is if it is possible to actually select, focus, and raise windows as they are highlighted in the WindowList, rather than only on release (or Return) or click.

In other words, every time I hit Tab while holding Alt, I would like the subsequent window to be focused and raised even though I have not released Alt, dismissing the WindowList. Can this be accomplished? Thanks in advance.

No.

But I’ll add it to my TODO list. You’re not the only one to ask this over the years.

– Thomas Adam

Excellent, thanks for your work.

I’ve been fiddling with an implementation of something like this. I ran across this code which sort of does what the original poster asks. I thought people interested in a feature like this might find it useful:

DestroyFunc NextWindow
AddToFunc NextWindow
+ I	  Next (CurrentPage !Iconic AcceptsFocus) Focus
+ I 	  Current Raise
+ I 	  Current WarpToWindow 5 5

Key Tab		A	4	NextWindow

This binds the command to SuperL-Tab (the left windows key). It doesn’t display the window list, of course, but it does cycle through the windows and raise them all in turn. It does some strange things I don’t understand. I think one problem is that it doesn’t skip the windows with WindowListSkip set. And there doesn’t seem to be a test for this. Another thing that is a bit mysterious to me is that it changes pages even though the test says “CurrentPage”.

But has nothing to do with the original question anyway,

[quote=“adrian”]

DestroyFunc NextWindow
AddToFunc NextWindow
+ I	  Next (CurrentPage !Iconic AcceptsFocus) Focus
+ I 	  Current Raise
+ I 	  Current WarpToWindow 5 5

Key Tab		A	4	NextWindow

This is missing commas between the conditional commands. It doesn’t need “Current” for all the actions in the function as it’s running in a window context already. It won’t switch pages, despite your claim, and it will honour the CirculateSkipList, which is different from the WindowList.

– Thomas Adam

Yes, it definitely does switch pages. I have observed it to switch pages several times. It seems to cycle through all the windows on the first page and then when it runs out it jumps to a different page.

If I remove the “Current” from the function then it takes two presses of SuperL-Tab to switch to the next window instead of one, so

Of course it respects CirculateSkipList, but at least with my current configuration there is a bunch of stuff not on this list that is on WindowSkipList. If the goal is to search only the windows on WindowList then this doesn’t do that. I haven’t carefully investigated to figure out if I can add CirculateSkip to all the windows on WindowSkipList or if this will break something else in my config.

Nothing to do with the original question? Maybe I don’t understand how the proposed feature would work, but it seems like if the order of the WindowList is the same as the order of the ring of windows used internally for evaluating conditions then pressing a keystroke to raise each window is pretty similar to moving the mouse or cursor across that list and having all the windows raise in turn.

“Runs out”? Really – I can’t get it to switch pages because the conditional commands don’t allow it to. So I wonder what you’re doing to make it so. Either way, it won’t be related to your function. That much I can tell you.

Nope. This isn’t possible.

– Thomas Adam

I investigated more carefully what exactly was happening when the page changed. It appears that when the Next command selects sticky windows (xbuffy, FvwmIconMan, a sticky xterm) it (often) switches pages for some reason. These windows tend to be last in the rotation, so in my less careful observation I got the impression of cycling through all of the windows before the page change.

As a further test, I modified the code to skip sticky windows:

DestroyFunc NextWindow
AddToFunc NextWindow
+ I	  Next (CurrentPage,!Sticky,!Iconic,AcceptsFocus) Focus
+ I 	  Raise
+ I 	  Current WarpToWindow 5 5

With this change, the code no longer switches pages. I tried experimenting by sending commands like the following using sticky windows:

Next (xbuffy) WarpToWindow

and sometimes they caused the page to change, sometimes not.