Subject: FVWM: a few Q's

From: Ken Deeter <[email-masked]>
Date: Sat, 12 Apr 2003 14:54:33 -0700

Hi,

I've gotta few configuration questions that I was hoping somebody could
help me out with. Was using gnome2 for a while, but realized i needed something
more than metacity... will probably converge to fvwm 2.5 + gnome2 eventually..

Anyhow, I'm using 2.4.15 for the moment, and I've got a few things that I'm trying
to do but can't seem to figure out how to do them.

1) Focus when switching pages: When I switch a page, I want the last focused window
on that page (before i left) to be refocused. To do this, I tried to write a function
like:

AddToFunc GotoPageAndFocus
+ I GotoPage $0 $1
+ I Next [CurrentPage] Focus

So that I can say something like

Key Up	C	GotoPageAndFocus +0p -1p

This almost works.. as it switches pages and focuses something, but
unfortunatley it focuses the wrong window. Every time I return the to a
page the "next" window in the page is focused. I can't figure out how to
refer to the former "current" window of that page.

2) Raising when using WindowList: I want to try to replicate sawfish type behaviour in
combination with the windowilst.. is there any way to capture the user moving down
through the list and running commands based on the current selected window (before
the SelectOnRelease fires)?

3) How "unstable" is 2.5.x? Is it like a "its a CVS snapshot so it might
not even compile" type of unstable? or is it a "it mostly works but
there might be a few bugs" kind of stable. I've seen some of the
screenshots of 2.5.x which look quite interesting, plust the EWMH
compatibility, but i also don't want something that I'm gonna have to
fight with all the time. Also, I'm sure lots of people ask and I know
its on the FAQ,etc etc, but is there a ballpark estimate for when 2.6
might be out? (a few months? a few years?) Just helps in trying to make
a decision of whether I should wait and stick with 2.4.x or make the jump.
And if I do make the jump will likely bring an ebuild to the gentoo tree.

4) is there a way to search the ML archive?

Thanks alot. Having lots of fun with the .fvwm2rc.. a bit tedious, but I
guess thats what you get.

Ken

-- 
"If only God were alive to see this.. "  -Homer Simpson
--
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: parv <[email-masked]>
Date: Sun, 13 Apr 2003 01:46:47 -0400

in message <[email-masked]>,
wrote Ken Deeter thusly...
...
> This almost works.. as it switches pages and focuses something,
> but unfortunatley it focuses the wrong window. Every time I return
> the to a page the "next" window in the page is focused.

I want something like that too, but don't need badly enough to think
about it myself ... just thinking out loud.

> 3) How "unstable" is 2.5.x?  ... is it a "it mostly works but
> compatibility, but i also don't want something that I'm gonna have
> to fight with all the time.

It is rarely unstable.  I have been exclusively using the released
versions of development branch since around 2.5.[23].  Only in 2.5.4
a serious bug cropped up (FvwmPager eating up 100% CPU) which was
fixed very quickly.

Otherwise, other people keep finding problems that do not seem to
affect me; they may elaborate on that part.  Or, just monitor the
fvwm-workers list traffic and see them -- both the people & the
problems -- yourself.

> 4) is there a way to search the ML archive?

Use your browser's search capabilities.  Try Google (if the right
portion of hpc.uh.edu is indexed); see also:
<http://groups.google.com/help/refinesearch.html>.

  - parv

--

---

From: Marcus Lundblad <[email-masked]>
Date: Sun, 13 Apr 2003 11:26:26 +0200 (CEST)

> + I Next [CurrentPage] Focus

The commands Next, Current, Prec etc, are called directional
commands. They define a "search direction" for windows. So Current means
"no direction", Next means "forward direction" and so on.
The part within "[]" are conditions that are to be met for a window to
match.
So "Next [CurrentPage]" matches the first window counting "forward" in the
window stack that is on the current page.
Current means the current window in the stack, but if there is also
[CurrentPage] it will only match the current window if it's on the current
page, otherwise no window will match.

The same applies to for example "Raised", "Lowered"

//Marcus

---

From: Ben Winslow <[email-masked]>
Date: 13 Apr 2003 17:58:02 -0400

> on that page (before i left) to be refocused. To do this, I tried to write a function
There's currently not a way to do this internally, *however*, Peter
McAlpine wrote a module using FvwmPerl to pull this off.  I've thrown it
at http://themuffin.net/FvwmTrackFocus.pl since I don't want to attach
it.  I load it from my InitFunction with 'Module FvwmTrackFocus.pl', and
there's little else to it!

I do think you'll need to use 2.5 for it, though--I don't think
FVWM::Module exists in 2.4.

> the SelectOnRelease fires)?
I don't think there's a way to do this, either, but I'd like to see
something like it.  I often have so many windows on one viewport that
it's very difficult to figure out which I'm actually after by the window
title alone.

> And if I do make the jump will likely bring an ebuild to the gentoo tree.
I've found 2.5 to be very stable (although I have managed to crash it a
few times, it was always reproducable and ended up being fixed in the
latest CVS tree), but if you're worried about losing everything in your
X session because fvwm crashed (e.g. you exec it from your .xsession),
you might find this shell snippet handy:

At the end of my ~/.xsession, I have:

while [ 1 ]; do
	fvwm
	RET="$?"
	if [ "$RET" = 0 -o "$RET" = 1 ]; then
		break
	fi
	if [ "$RET" -gt 128 ]; then
		SIGNAL=" (signal $((RET - 128))"
	else
		SIGNAL=
	fi
	xmessage "fvwm returned with exit code $RET$SIGNAL"
done

This pops up an xmessage if fvwm exits abnormally explaining what
happened and then restarts it.

> 4) is there a way to search the ML archive?
http://www.mail-archive.com/[email-masked]/ has a search
form--unfortunately, it doesn't work.  Your best bet is probably google
as parv suggested.

-- 
Ben Winslow <[email-masked]>

---

From: Cameron Simpson <[email-masked]>
Date: Sun, 13 Apr 2003 10:31:12 +1000

On 14:54 12 Apr 2003, Ken Deeter <[email-masked]> wrote:
| 3) How "unstable" is 2.5.x? Is it like a "its a CVS snapshot so it might
| not even compile" type of unstable? or is it a "it mostly works but
| there might be a few bugs" kind of stable. [...]

It's the second kind. I've been running 2.5.x fvwms for quite a while now and
they've been very good. They are not random snapshots.

Even CVS is often quite good - I think they developers adhere fairly
well to "don't commit unless the build succeeds" methodology, which
makes using the CVS HEAD checkout at least feasible.

There's LOTS of nice stuff in the 2.5 series - I don't use 2.4 at all and
hope never to have to - I use and like too many of the new features.

The main thing which may bite you is than in 2.5 they feel fairly free
to fiddle the keywords. They tend to keep backwards compatibility to
a degree (lots of nice warnings about "don't use X, use Y instead!"
when you run up an old config with newer FVWM, and often the old keyword
still works anyway, easing transition).

Cheers,
-- 
Cameron Simpson, DoD#743        [email-masked]    http://www.zip.com.au/~cs/

Indeed! But do not reject these teachings as false because I am crazy. The
reason that I am crazy is because they are true.
	- Malaclypse the Younger

---

From: Ken Deeter <[email-masked]>
Date: Sun, 13 Apr 2003 18:25:29 -0700

Hi, thanks for the responses.

> FVWM::Module exists in 2.4.

Nice. I'll give that a try. The Perl module stuff seems very interesting
to me... it lets you keep state that the core itself doesnt.. but for me
it leads to the question, how much of the functionality do you implement
in the core and how much in perl (or other external module)? Is there a
philosophy in terms of what goes in and what stays out? Is fvwm going in
the direction of a sawfish that uses perl but with better primitives?

Also how is the performance of the perl module? and can something
simliar be done for other languages (ruby?) 

> it's very difficult to figure out which I'm actually after by the window

Perhaps there is some way to do it with the perl stuff..

> happened and then restarts it.

interesting.. i'll have to give that a try.. or perhaps i could
do an automatic respawn if I put it into a gnome session.

Ken

---

From: Ken Deeter <[email-masked]>
Date: Sun, 13 Apr 2003 22:38:58 -0700

> there's little else to it!

This seems to work pretty well, except that if you have ClickToFocus and
ClickToFocusRaises enabled, it only works if you map keyboard events to
GotoPage-like events. In my setup, I use the pager, and when I click on
the pager it gets focus, and because it gets focus, the FvwmButtons
would always be the focused window when I switched around using the
pager,

so my solution was to change all occurances of M_FOCUS_CHANGE in the
perl script to M_RAISE_WINDOW. Then in my .fvwm2rc say:

Style FvwmButtons ClickToFocus, ClickToFocusRaisesOff

so that the window that the perl script tracks will not be over written
just because i clicked in the pager. I suppose another solution would
be to make the script explicity ignore FvwmButtons or FvwmPager focus
events, but that seems like a bit of a hack anyways.. for ClickToFocus
type settings this seems to be reasonable.

----------------

I've managed to get fvwm to load as a part of gnome-session (from
gnome2). I'll describe the procedure here, in case anyone is interested

essentially, in my .xinitrc i say:

export WINDOW_MANAGER="fvwm"

unfortunately, gnome-wm (which is called by gnome-session to start the
wm) doesn't know about fvwm's -i option (as of gnome-session 2.2.1) so
you have to hack gnome-wm and add it in yourself.

If you use the default session, then fvwm will be started in a "restart
on death" type of style, so you won't lose everything when it gets
killed, or when it crashes.

A few problems however:
I can't get the gnome-panel to stay on top, and as it's drawer panels don't
come to the front as well.

Style gnome-panel StaysOnTop 

doesn't work.. what could make a "StaysOnTop" not take effect?

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 14 Apr 2003 10:47:55 +0200

> doesn't work.. what could make a "StaysOnTop" not take effect?

The gnome panel sets the layer itself.  You can try to set

  Style gnome-panel GnomeIgnoreHints

but this disables a lot of other gnome related hints too.  You can
tell the panel to stay on top from its config panel.

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 14 Apr 2003 09:34:07 +0000

> Style FvwmButtons ClickToFocus, ClickToFocusRaisesOff

Or better yet mark all windows that should not be focused:

  Style FvwmButtons NeverFocus

Then you may return to M_FOCUS_CHANGE since it is more correct.

> type settings this seems to be reasonable.

Regards,
Mikhael.

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 14 Apr 2003 11:38:50 +0000

> the direction of a sawfish that uses perl but with better primitives?

The Perl module API is just an alternative to the C module API, nothing
else in the terms of philosophy. It is however more usable for scripting,
since it does not require compiler to run.

> Also how is the performance of the perl module?

Usually you may hardly notice a difference between modules written in C
and in Perl, but this depends on what you actually do.

> and can something simliar be done for other languages (ruby?)

No, only perl is supported. Theoretically you may implement the FVWM ruby
library similarly to perllib, but it is a lot of work and you should know
some internal FVWM details to do this. Just use perl.

> Perhaps there is some way to do it with the perl stuff..

To reduce you an experimentation time, you can't raise windows while
browsing a native menu, because of the way menus currently work.

You can implement it similarly to how FvwmProxy (the current name in cvs,
will be renamed) does it. Say, by opening a window with a window list.
Possibly using FVWM::Module::Gtk. Maybe this will be an optional
functionality of FvwmWindowMenu (a module that uses perllib) one day.

Regards,
Mikhael.

---

From: Dan Espen <[email-masked]>
Date: Wed, 16 Apr 2003 00:11:50 -0400

> form--unfortunately, it doesn't work.  Your best bet is probably google

I contacted the site owner.
Searches work again.

-- 
Dan Espen                           E-mail: [email-masked]