[Top][All Lists]

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

Re: [RP] One command to unbind them all?

From: Jonathan Walther
Subject: Re: [RP] One command to unbind them all?
Date: Thu Oct 17 21:46:02 2002
User-agent: Mutt/1.4i

On Thu, Oct 17, 2002 at 10:05:45PM +0200, Stephane Chauveau wrote:
Ok, this should be done with a minor patch and a bit of shellscript.  If
there isn't already, maybe you could make a keybindings command, which
will print to stdout a list of all the current keybindings, one per line?
Then you could take them and "ratpoison -c unbind" them one at a time.

Huu!! wouldn't it be easier to create a command unbind_all?

No. That command is too specific.  You can only use it for one thing.
Being able to "dump" all the keybindings to stdout so that other
programs can do anything they want with them, that would be useful.  It
is the ratpoison way.  Ryan, Gergely, Shawn, jump in and help me here :)

Similarly, the window list gets dumped to stdout; that motivated me to
develope ratmenu, and a little shell script to create a menu that can
switch between windows.  Thats why noone has bothered to add in a patch
so that the default window list would wrap onto the next line if the
text overflowed; because the proper place for that sort of formatting
and pretty-printing is outside ratpoison, where we've already solved the
problems with third party apps.

Remember, a bloated rat has probably swallowed poison. :)


static int
unbind_all (void)
 int i;
 for (i=0; i<key_actions_last; i++)  {
      free (key_actions[i].data) ;
 key_actions_last = 0 ;

                    Geek House Productions, Ltd.

 Providing Unix & Internet Contracting and Consulting,
 QA Testing, Technical Documentation, Systems Design & Implementation,
 General Programming, E-commerce, Web & Mail Services since 1998

Phone:   604-435-1205
Email:   address@hidden
Webpage: http://reactor-core.org
Address: 2459 E 41st Ave, Vancouver, BC  V5R2W2

Attachment: pgp0L4XEmbXag.pgp
Description: PGP signature

reply via email to

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