[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RP] Missing screen command "resize"
From: |
Mike Meyer |
Subject: |
Re: [RP] Missing screen command "resize" |
Date: |
Wed Nov 14 15:36:02 2001 |
Shawn <address@hidden> types:
> Mike Meyer <address@hidden> writes:
> > I notice that screen's "resize" command is missing from rp, and not in
> > the set of commands that anyone was thinking about implementing. rp
> > clearly needs two commands, one for vertical and one for horizontal,
> > or maybe an extra argument to indicate the direction.
> Yes this is true. A resize command would be nice.
As it turns out, while resize in a 1d grid is trivila, doing it in a
2d grid is - uh - interesting.
I think I can see a way to do it, but one of the tools I'll need along
the way is useful by itself. To wit, a version of split with a bit
more control.
The idea is that you can specify an uneven split. I thought about
allowing a specification by fraction, or a specification by pixel
count, and couldn't chose between them. So rolling both ideas into
one:
argument 0 or null: current behavior.
argument >= 1: specifies number of pixels for the new frame.
argument < 1: specifies a fraction of current frame for new frame.
All current scripts would work as properly.
Assuming I had my current frame (800 x 1200), doing:
hsplit, hsplit .5, hsplit 600 - two 800 x 600 frames.
vsplit .3333333 - one frame 800 x 400, one frame 800 x 800.
vsplit 500 - one frame 800 x 500, one frame 800 x 700
Yes, that's a floating point argument. That allows the most
flexibility for the user. The alternative would be to make this a
positive/negative split, where one indicated pixels and the other
indicated a fraction (i.e. - vsplit 3 instead of vsplit .33333), but
then you can't do the equivalent of vsplit .8.
And yes, I don't really like the bundled behavior, but it seems like a
better solution than yet more commands.
Comments? Alternative suggestions? Rotting vegetable matter?
<mike
--
Mike Meyer <address@hidden> http://www.mired.org/home/mwm/
Q: How do you make the gods laugh? A: Tell them your plans.