On Sat, May 20, 2000 at 03:24:02PM -0230, Neil Zanella wrote:
>
> 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...
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, dominik.vogt_at_gmx.de
Reply-To: dominik.vogt_at_gmx.de
--
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 Mon May 29 2000 - 19:41:25 BST