Re: FVWM: Keystroke to Switch Windows

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Sat, 28 Jun 2003 13:10:59 +0000

On 17 Jun 2003 23:58:07 -0700, Loren M Lang wrote:
>
> One of my favorite things about X11/Fvwm
> is the idea of using focus follows mouse,
> I've had my system set to do that ever
> since I discovered it years ago. Though,
> in the effort to become more efficient, I
> have though it might be more convient to
> borrow a keystroke from windoze, though
> there is something about that idea that
> just bugs me... Using alt-tab or maybe
> something easier, like win-z or even just
> win since I'd use it more often then
> bringing up my root menu, to switch
> between windows. I've setup the following
> so far:
>
> Key Tab A M Next (AcceptsFocus Visible) Focus
> Key Tab A SM Prev (AcceptsFocus Visible) Focus

It is better to use a complex function here instead of Focus, in this
function you may do Focus, Raise, WarpToFocus, uniconify and so on.

> This almost does what I want except I want
> Alt-Tab to always go to the last window that
> had focus, not cycle through all of them.
> Also, in windoze, if you don't release the
> alt key and hit tab multiple times it goes
> to windows farther down the stack of last
> window to have focus so Alt-Tab was the
> previous window and Alt-Tab-Tab was the
> second to last window to have focus. Is
> there any way to implement this with fvwm?
>
> There is one bug with this I've seen a few
> times where when I hit Alt-Tab, it changes
> focus to a window on a different page
> causing my page to change to it, and when
> it does it, it is consistent. Is it a bug
> in fvwm, my code or what? I have fvwm-2.4.6

I didn't investigate it, but it seems that the Visible condition does not
work in the current cvs version, like in your binding.

But if you use CurrentPage instead of Visible, it works well:

  Next (AcceptsFocus, CurrentPage, !Iconic) Focus

As for all features you asked for, you may use this config in 2.4.16+:

  Key Tab A M WindowList (CurrentPage) Root c c CurrentAtEnd

  DestroyFunc WindowListFunc
  AddToFunc WindowListFunc
  + I Focus
  + I Raise
  + I Iconify false

If you don't redefine WindowListFunc, the default is to do WarpToWindow
too and it may switch to another page if part of the window is on another
page. You may or may not like this (your message probably says you don't
like WarpToWindow, but I may only guess), so first try just one Alt-Tab
binding above without redefining WindowListFunc.

For older versions (2.4.15) the syntax of WindowListFunc is a bit more
complex, see the man page for your version. CurrentAtEnd option is only
available in 2.4.8, so you should upgrade your fvwm version anyway.

> Also, I'm wondering if I start using this
> if I should switch back to click to focus.

ClickToFocus is not required, it is not even the default.

P.S. You use 44 characters per line in your message. Is not 66 to 76
characters per line more usable/readable?

Regards,
Mikhael.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sat Jun 28 2003 - 08:12:57 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:55 BST