Re: [dwm] configuration

From: Anselm R. Garbe <arg_AT_10kloc.org>
Date: Tue, 1 Aug 2006 15:25:05 +0200

On Tue, Aug 01, 2006 at 09:07:43AM -0400, Juan Fuentes wrote:
> On 8/1/06, Anselm R. Garbe <arg_AT_10kloc.org> wrote:
> >
> >While being offline on Crete, I thought about configuration
> >of dwm at the beach (and in the salt water of the Aegaeis)...
> >
> >I pretty much disliked in dwm-0.5 to have to edit several
> >different files to customize the beast for my needs, that's why
> >I decided to use CPP and a config.h file in the future (already
> >in hg tip), even if it might be ugly.
> >
> >The config.h file defines several macros, esp. TAGS, DEFTAG,
> >CMDS, KEYS, and RULES. Those contain the static struct definitions
> >defined in the .c files before.
>
> I'm new to the list, and new to the window manager, and let me
> tell you it's the best I've used in all my years in Unix. That
> being said I have one question why are you not using the
> struct definitions directly instead of the macros? I have an
> idea why you did it, but like to know your reason :).

In dwm-0.5 I used the struct defintions directly, which was the
reason for editing several files actually.
I tried to use information hiding whenever possible to declare
things static that they belong to the specific object file only
(e.g. the keys defintion only belongs to event.o, the rules
 defintion only belongs to tag.o). There are technical reasons
as well which make it impossible to define some data structures
globally without cluttering all object files (like keys).

Also, the way it is done in the current way also keeps the
binary pretty small (the stripped dwm binary has 27692 bytes for
me.

Regards,

-- 
 Anselm R. Garbe  ><><  www.ebrag.de  ><><  GPG key: 0D73F361
Received on Tue Aug 01 2006 - 15:25:05 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:29:50 UTC