Subject: FVWM: multiple resizing function

From: Neil Zanella <[email-masked]>
Date: Sat, 20 May 2000 15:24:02 -0230 (NDT)

Hello,

I wonder if it is possible to do the following with fvwm2: I would like to
have a function bound to a titlebar button that does the following:

- Upon first click the window is maximized horizontally.
- Upon second click the window is expanded so that its right border 
  touches the right side of the viewport immediately to the window's
  right.
- Upon third click the above step is repeated so that the window occupies
  three viewports (the original one and the two to its right).
- At the nth click the window occupies n viewports, etc...

Thanks for your help,

Neil Zanella
[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: Michael Han <[email-masked]>
Date: Sat, 20 May 2000 17:33:14 -0700

Previously from Neil Zanella
>- At the nth click the window occupies n viewports, etc...

I don't think this is possible with fvwm. Something very clunky might
be possible by going "outside" to a PipeRead, but even that doesn't
exactly seem promising.
-- 
[email-masked]                         http://www.best.com/~mikehan/
coffee achiever                              San Francisco, California
"Notice how I  blame my own mistakes  on the lack  of rules?" - Dan Espen 
--
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: Dominik Vogt <[email-masked]>
Date: Tue, 30 May 2000 02:12:15 +0200

> - At the nth click the window occupies n viewports, etc...

With the patch I have just made it's possible:

  AddToFunc MaximizeWidthMult
  + i piperead "echo maximize on $$[(($[w.width] + 50) / $[vp.width]) * 100 + 100] 0"

This works with zsh, but probably also with bash, sh, ...
The interesting parts are the outer '$$[...]' which is a
quoted shell arithmetic expansion ($[...]) and the inner
$[w.width] which is replaced by the window's width by fvwm
and the $[vp.width] (viewport width).  The +50 rounds up the
window's width in case the viewport width is not a multiple
of the window's width_inc.

The patches are fairly trivial.  In fact writing the new
parameters (see ChangeLog and man page) brought up half
a dozen bugs in the expansion code that were already there :-p
So I allowed me to commit these changes without asking for
votes first (I hope nobody takes offense - it's just that
the patch is trivial and fixes more core dumps than is could
possibly cause :-) )

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