ratpoison-devel
[Top][All Lists]
Advanced

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

Re: [RP] crude patch to pass windowids from cmd_exec


From: Ryan Yeske
Subject: Re: [RP] crude patch to pass windowids from cmd_exec
Date: Fri Sep 7 10:18:02 2001
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.3

shawn <address@hidden> writes:

> >
> >> One way could be to parse the output of 'ratpoison -c windows' which
> >> will spit a list of the windows. a * after the number indicates the
> >
> >Ah, the debian (unstable) one is almost a month old and doesn't have
> >that (or rather, it doesn't emit to stdout.)  Will nag :-)
> 
> Yes, we're gearing up for a release, so there's no sense in updating
> the deb package until then.
> 
> 
> >However,  get_window_list doesn't reference w->w at all, so that
> >doesn't do me any good (names are ambiguous, and the "window number"
> >is not meaningful outside of ratpoison - I need the X WindowID
> >itself.)
> 
> Ahh, now I understand what you're looking for.
> 
> >Would you find setting WINDOWID in the environment to be a at least a
> >little cleaner?  Various programs will use it if set, entirely because
> >xterm itself sets it... that's why xwit is so useful in a non-mousing
> >environment, you can do things like "xwit rmove 10 10" and move the
> >xterm you typed it in by that much.  (The reason to get this info from
> >ratpoison is that not all windows are xterms :-)
> 
> yes. Hmmm, let me think about it. I like the idea, but there's still
> that nagging little voice saying, "hack, hack!".

I remember thinking before that the window command should take a
formatting string.  If we provided a formatting code for the window
id, would this help?

%n == (ratpoison) window number
%c == the current window indicator character (+-*)
%n == the name
%i == windowid
...

Then we could do things like: ratpoison --command='window "%n%c%n\n"

for the standard interactive output:

0-emacs
1*xterm
2+mozilla

and ratpoison --command='window "%i %n\n"

234234 emacs
234231 xterm
545334 mozilla

What do you think?

Ryan




reply via email to

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