Re: FVWM: 'Maximize grow grow' automatically.

From: Rob 'Feztaa' Park <feztaa_at_shaw.ca>
Date: Tue, 30 Jul 2002 18:17:32 -0600

Alas! Fvwm spake thus:
> On Mon, Jul 29, 2002 at 03:29:27PM -0600, Rob 'Feztaa' Park wrote:
> > Alas! Fvwm spake thus:
> > > > Would it be possible to do this, without affecting the behavior of
> > > > the other xterms that I open individually?
> > >
> > > Try this:
> > >
> > > addtofunc XtermCreateGrow
> > > + i exec exec xterm
> > > + i wait xterm
> > > + i next (xterm) maximize grow grow
> > >
> > > addtofunc Create4XTerms
> > > + I XtermCreateGrow
> > > + I XtermCreateGrow
> > > + I XtermCreateGrow
> > > + I XtermCreateGrow
> > >
> > > AddToMenu foobar
> > > + "4 XTerms" Create4XTerms
> >
> > Didn't work; the end result is that one already opened xterm grew,
> > another opened and grew, a second opened and did nothing, and then a
> > third and fourth opened which both grew.
>
> Well, it's not clear what you expect of growing.

I expect it to utilize as much screen space as possible without
overlapping. The problem here is that the windows are being grown too
soon; they need to wait for the other windows to be open before they are
grown.

> Usually it doesn't make sense at all to maximize more
> than one window on a single page, and it gets worse with "grow".

I totally disagree with this statement. I have here a situation in which
it makes perfect sense to grow four windows (though, in reality, the
top-left one stays the same size). I've yet to see a situation in which
fully maximizing more than one window makes any sense ;)

> Actually, why do you think you need "grow"?

Because then I don't have to bother figuring out how big they ought to
be, and I can use one command to size any window perfectly, and they
don't overlap. It's all about flexibility and convenience.

> What is the layout of your desktop before the xterms are created and
> how would you like it with them? Please draw ASCII graohics to
> illustrate your needs.

I think I need grow, because I have wasted screen space that I want to
be used by xterms. Here is what my desktop looks like before growing:

+------------------------+
|xterm |xterm | |
| | | |
| | | |
+---------+---------+ |
|xterm |xterm | |
| | | |
| | | |
+---------+---------+ |
| |
| root |
| |
+------------------------+

And I want it to look like this:

+------------------------+
|xterm |xterm |
| | |
| | |
+---------+--------------+
|xterm |xterm |
| | |
| | |
| | |
| | |
| | |
| | |
+---------+--------------+

Understand now? The original problem was that it was growing them in the
wrong order and the wrong time, and the result was oddly grown windows,
not in the way that I wanted them. Manually growing each one after it's
open does exactly what I want, I was just looking for a way to automate
it.

> > Aside from the fact that it's growing the wrong ones, it's also growing
> > them before the others open which results in one fully maximized behind
> > some others grown into odd shapes.
> >
> > > However, it's really better to provide the xterms with the proper
> > > geometry manually. The "Next" command can not guarantee that the
> > > command is applied to the correct window.
> >
> > Aw, but manually is too hard! That means I'd have to hardcode the size,
> > which would be a PITA if I ever change X resolutions.
>
> I can't speak for you, but the only time I change the resolution
> is when I get a new machine.

Yes exactly, I'm getting a new machine soon, and I'd rather not have to
re-figure out what size the xterms need to be when "Maximize grow grow"
is right there for me to use.

> However, it *is* possible to write these lines in a way that takes
> care of the display resolution by invoking a shell script via
> PipeRead. I can write one that satisfies your need once I understand
> what you want to do.

I just want to eliminate wasted screen space, so I can see as little of
the root window as possible, with four xterms that are as large as
possible without overlapping.

-- 
Rob 'Feztaa' Park
http://members.shaw.ca/feztaa/
--
You can measure a programmer's perspective by noting his attitude on
the continuing viability of FORTRAN.
		-- Alan Perlis
--
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 Tue Jul 30 2002 - 19:08:48 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:53 BST