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

From: Stefan Tibus <>
Date: Thu, 6 Apr 2006 08:23:34 +0200


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 ;-) )

Received on Thu Apr 06 2006 - 08:24:09 UTC

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