[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] Patch for frames et al...

From: Mike Meyer
Subject: Re: [RP] Patch for frames et al...
Date: Tue Nov 13 23:46:02 2001

Shawn <address@hidden> types:
> Mike Meyer <address@hidden> writes:
> > frames are now numbered and named like windows, except they all have
> > "Unnamed" as the default name.
> Why do frames have names and numbers?? I don't understand why this
> would be useful. I certainly wouldn't find it useful.

This all comes from the question - how do I get a specific window into
a specific frame. I originally gave frames names and numbers so
scripts would have some way to refer to a frame other than the current
frame - which isn't necessarily stable!  For example, I have a
script that changes the name of all visible windows to be
"address@hidden", where number is the frame number. A second script then
puts all windows with a name of the form "address@hidden" into that frame

However, I've since found it so useful that I've rebound the commands
0-9 to go to that frame number instead of that window number. I've
also changed the default winformat to include the frame number instead
of the window number - and tweaked the python windows menu script to
use the default winformat. That tells me at a glance whether selecting
a window from it will go to another frame, or open a window in the
current fram, which I find invaluable.

> How many frames do you have sitting around at one time anyway?

Right now? 9, one of which is empty.

> If I understand your patch correctly, you would have to name frames
> MANUALLY and if a frame is removed and an identical one created again
> you would have to name it AGAIN. This does not bed well with
> ratpoison's philosophy. Ratpoison is here so we don't have to manage
> windows. If one were to use the frame names functionality it would make
> managing windows a chore again.

You're right - frame names vanishing when the frame does makes them a
bit of a PITA to use. Window names have the same property, but windows
important enough to get named don't get closed very often. Frame names
fell out of merging the list management code.  In OO terms, frames
should have a name attribute because they get passed to functions that
can look for names. While it would be straightforward to move the name
out of the link structure and tweak the function to always return the
same thing, there wouldn't be much benefit to doing so, and it is
possible to make use of frame names.

For instance, I have a frame configuration I use pretty regularly, and
so have a key bound to create it from a single frame. It renumbers a
few frames along the way. It could just as easily rename them, the
"ratsave" script would go away and "ratrestore" would put windows into
frames based on the frame name instead of the number.

Mike Meyer <address@hidden>                     http://www.mired.org/home/mwm/
Q: How do you make the gods laugh?              A: Tell them your plans.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]