Re: [wmii] snap: 20060401, easier wmiirc for config shortcuts

From: Anselm R. Garbe <garbeam_AT_wmii.de>
Date: Thu, 6 Apr 2006 08:39:09 +0200

On Thu, Apr 06, 2006 at 08:23:34AM +0200, Stefan Tibus wrote:
> Hello,
>
> I have one suggestion on this, which you might like to implement
> (or maybe not).
> Most of the shortcuts (I think I have only one where this is not
> true at the moment) are simply mapped to some program call. So
> for me it would be nice to have them in an array together with
> the commands, instead of having to edit them in separate places.
> With your patch I'd still have to create the shortcut variable,
> add it to the wmiir write /def/keys call and to the case statement
> as well. Your patch saves on changing existing shortcuts only
> (which is still an improvement).
> So the idea would be to have an array for the "simple" shortcuts
> containing the shortcut and the associated command. Writing these
> to /def/keys appears straight forward. The event loop however
> would need to check for all shortcuts in the array and then
> execute the associated command. I have no idea how to do this in
> sh, however. For "advanced" shortcuts the current case construction
> should be kept.
> What do you think?
>
> (There would probably be a very "elegant" way to do this in perl,
> but I guess nobody would like to depend on that ;-) )

See awk(1) for reference.

Regards,

-- 
 Anselm R. Garbe  ><><  www.ebrag.de  ><><  GPG key: 0D73F361
Received on Thu Apr 06 2006 - 08:39:09 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:01:54 UTC