Subject: FVWM: Keystroke to Switch Windows

From: Loren M Lang <[email-masked]>
Date: Tue, 17 Jun 2003 23:58:07 -0700 (PDT)

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

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

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

- -- 
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.

Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
Fingerprint: B3B9 D669 69C9 09EC 1BCD  835A FAF3 7A46 E4A3 280C

--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 28 Jun 2003 13:10:59 +0000

> 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.

> 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.

> 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.

---

From: [email-masked]
Date: Sun, 29 Jun 2003 12:19:44 +0200

> > in fvwm, my code or what?  I have fvwm-2.4.6

Probably there are a few pixels of the window visible on the
current page (?)

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

Works exactly as documented for me.  Please, I you see a problem,
always provide details about it.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 29 Jun 2003 23:54:03 +0000

> always provide details about it.

Probably because you use only one desk. Start fvwm with this initial rc:

  Key Tab A M Next (Visible, AcceptsFocus) Focus
  Style FvwmConsole Sticky
  Style FvwmPager Sticky
  FvwmPager 0 3
  Wait FvwmPager
  FvwmConsole
  Wait FvwmConsole
  Exec xterm -name xterm1
  Wait xterm1
  GotoDeskAndPage 1 1 1
  Exec xterm -name xterm2
  Wait xterm2

Press Alt-Tab. Visible is ignored.

Regards,
Mikhael.