Re: [dwm] Thinking about tags

From: Anselm R. Garbe <>
Date: Thu, 16 Aug 2007 08:01:14 +0200

On Wed, Aug 15, 2007 at 07:52:27PM +0200, Antoni Grzymała wrote:
> On Wed, 15 Aug 2007 19:12:26 +0200, Anselm R. Garbe <>
> wrote:
> >>I like the consistency as it stands - ie. I don't need to edit my
> >>keybindings if I change my tag names - access to my tags remains
> >>consistent. Not that I change my tags often, but I don't see an
> >>advantage to having to edit them in 4 extra places (having said that, I
> >>admit that I would need to edit them in all my rules anyway, so maybe
> >>having to edit them in the keybindings is no great hardship)
> >
> >Ok, that is a good point to think about.
> I think this is a very important point. Please keep the numbering. I also
> think that having the tag names in one place (instead of four) makes
> modyfying config.h less error prone.
> On the other hand I can imagine using defines in config.h for that as in
> #define TAG_0 www, then view(TAG_0). Maybe this is another way to approach
> the problem.

I was too tired yesterday. There is a much better way to do it
and switching to the name instead of the index or such ifdefs.

Just use tags[0], tags[1] as argument in the key definitions.
This way I only need to perform pointer checks to gain the
index, which will be even same efficiency than atoi()'ing it,
but less error prone. And you can redifine your tags as you like
without the need to bother about the key definitions.

I will implement this in the evening!


 Anselm R. Garbe >< >< GPG key: 0D73F361
Received on Thu Aug 16 2007 - 08:01:14 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:49:53 UTC