ratpoison-devel
[Top][All Lists]
Advanced

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

Re: [RP] interactive switch


From: Rupert Levene
Subject: Re: [RP] interactive switch
Date: Thu May 22 18:02:12 2003
User-agent: Mutt/1.5.3i

On Thu, May 22, 2003 at 04:47:31PM -0700, Shawn Betts wrote:
> Rupert Levene <address@hidden> writes:
>
> > I wanted to run the resize command interactively in a script and
> > found RP lacking. Here's a patch to fix that:
> >
> > http://rupert.dyndns.org/rp/#interactive
> >
> > This adds a command-line switch, --interactive, which tells
> > ratpoison to give you the same behaviour when you send a remote
> > command as you get when you type commands directly into the input
> > bar.
>
> I was interested to see how you did it. An interesting hack :). It
> seems simple enough, but a bit obscure. It seems like sometime in
> the future when we've all forgotten how it works this is going to
> seem sneaky.
>
> What about creating a new Atom (say RP_COMMAND_INTERACTIVE) and
> attaching it to the window along with the command? On the one hand
> it's going to be more overhead. But it might be clearer what's going
> on.
>
> What do you think?

I agree that the patch is a hack. One way to dehackify it would be to
write '(un)pack_command_struct' functions that would convert between a
flat string format and a struct containing the data and interactive
flag. Alternatively, could you pass a struct containing the command
string and flag(s) through a single atom? I'm pretty clueless about
this icccm thing.

My vague feeling is that using a whole new atom for one itty bitty
little flag is over-zealous. It makes sense to me to keep flag+command
together, since they don't make much sense individually.

Rupert



reply via email to

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