ratpoison-devel
[Top][All Lists]
Advanced

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

[RP] Re: Ratpoison-devel digest, Vol 1 #277 - 1 msg


From: Robert de Forest
Subject: [RP] Re: Ratpoison-devel digest, Vol 1 #277 - 1 msg
Date: Fri Apr 19 14:58:02 2002
User-agent: Internet Messaging Program (IMP) 3.0

> 
> Hi!
> 
> I begin by apologizing for not having a "references" or "in-reply-to"
> header in my message. I'm not subscribed to the list. I just saw the
> message from Stefan Sandstrom in the WWW-archives refering to something
> I've been thinking about for some days now (see subject).

Yeah, I only subscribe to the digest, so I'm replying to that.  I guess I'm a
lurker.

> Sven Hartrumpf wrote:
> 
> >> On 18 Apr 2002, Stefan Sandstrom wrote: 
> >> On Thu, Apr 18, 2002 at 08:39:32PM +0000, Doug Kearns wrote:
> 
> >>> Without thinking too much about it, I'm sure you could achieve most of
> >>> this with an external script.
> 
> >> I doubt that, but please do prove me wrong.
> 
> > If you can query the coordinates of each frame, you could
> > achieve most of it.
> 
> > Do we have such a query function (via the windows command?)?
> 
> My idea was to use 'windows %n %t %s %i'. The '%i' thing gives you the
> Id of each window. With this Id you can call 'xwininfo -id ID' to get
> the coordinates and size of each window. With 'xwininfo -root' you get
> the size of the display.

To make parsing easier, put %t (title) at the end, then you can split on
whitespace in a shell script.

> Now, the script should parse the output of these commands and transform
> it in a sequence of split/vsplit commands, which could then be written
> to a file to be latter called in order to restore the configuration. To
> restore not only the geometry of the frames but also their contents the
> script could call 'windows' again to get the RP-number of each window
> from its Id (the RP-number of a window might have been changed by the
> user using the 'number' command. The Id doesn't change).
> 

I'm going to try to implement this today, but I don't know of a reliable way to
associate window titles with content.  Some will be easy: Galeon puts "- Galeon"
at the end of its title.  XMMS puts "XMMS -" at the beginning.  VIM puts "- VIM"
at the end while editing, and "Thanks for flying Vim" when it's done.  However,
there are no standards in this area.

Another problem is that some programs (XMMS is a notable example) don't resize,
so their info will be a special case.

So, I'm soliciting suggestions.

Robert

-- 
 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|"I can't believe your computer ripped my pants!" | Robert de Forest
|                                                 | Rogue Sysadmin
|"...they're silk."                               |




reply via email to

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