Subject: a better Alt-Tab

From: Sergey Babkin <[email-masked]>
Date: Fri, 26 Jul 2002 16:15:09 -0400

Hi,

I've finally got around to port my beloved configuration (as described
in http://ezine.daemonnews.org/199902/fvwm.html plus some newer
developments) from fvwm1 to fvwm2 and in progress I've done I thing
that I think may be worthy inclusion into some of the sample configuration
files. 

It's a Windows-like implementation of Alt-Tab: when pressing Alt-Tab
once at a time, the focus will alternate between two windows, when
pressing Alt-Tab multiple times the focus will switch sequentially
between windows. The implementation is:

AddToFunc SetFocus
    + I WindowId $0 Focus
    + I FlipFocus 
    + I WindowList Root c c NoGeometry SelectOnRelease Alt_L CurrentDesk

AddToFunc PrevNext
    + I Next (CurrentDesk AcceptsFocus) Function SetFocus $w

AddToFunc TabForward
    + I Prev (CurrentDesk AcceptsFocus) Function PrevNext

Key Tab     A   M   Function TabForward

The idea in a nutshell is that the new window is taken from the
bottom of the list and brought to the top, and the old current window
is sent to the bottom of the list. So when WindowList is called, the
window at the top of the list (the default choice) is already the new one,
and you don't have to press Tab again to get to the next window.
And since normally the windows at the top and the bottom are exchanged,
pressing Alt-Tab once at a time will alternate between them.

-SB
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Fri, 26 Jul 2002 21:21:06 +0000

> Key Tab     A   M   Function TabForward

The problem with this is that it can't be canceled by pressed Esc to
return to the window that was focused at the time of Alt-Tab.

Anyway, in 2.5.2 (and partially in 2.4.8, remove IconifiedAtEnd) the
following emulates the Windows behaviour better if anyone likes it:

  Key Tab A M WindowList Root c c CurrentDesk, NoGeometry, CurrentAtEnd, IconifiedAtEnd

Regards,
Mikhael.

---

From: Sergey Babkin <[email-masked]>
Date: Fri, 26 Jul 2002 17:40:35 -0400

> return to the window that was focused at the time of Alt-Tab.

Well, you can always press Alt-Tab once more and switch back.
 
>   Key Tab A M WindowList Root c c CurrentDesk, NoGeometry, CurrentAtEnd, IconifiedAtEnd

Yes, I did not read the man page carefully enough. Thanks! Ah, I see
why I could have not noticed it: I've started fith fvwm 2.3.21 and I think
this option was not there.

-SB

-- 
Sergey Babkin                             [email-masked]
Escalations Research Group, Caldera - NJ  (908)790-2385
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]