Re: [dwm] Current tagging/static Rule options?

From: Anselm R. Garbe <>
Date: Sun, 15 Jun 2008 23:40:37 +0200

On Sun, Jun 15, 2008 at 02:07:30PM -0700, wrote:
> I switched to dwm from wmx about 6 months ago and have been fairly
> happy with the stock functionality of 4.7. The more recent versions
> including 5.0 have different tagging/static Rule options and I'm
> wondering what those options are WRT directing certain applications
> to specific tags, ex. all PDF views to the "pdf" tag; putting xclock
> on all tags. I saw the post about regexs in class going away but I
> couldn't find anything explaining for example what "1 << 8" implies
> in the static Rule rules. Maybe a few more examples could be added to
> config.h, or some "customizing" documentation added to the wiki?

Consider the following snippet from config.def.h,

static const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };

static Rule rules[] = {
        /* class instance title tags mask isfloating */
        { "Gimp", NULL, NULL, 0, True },

First of all, I substituted 'tags ref' into 'tags mask' in the
Rule comment in most recent hg tip, to reflect its purpose.

In new dwm-5.0 you need to use a bit masks to address tags which
should be assigned in a rule -- this is the tags mask. Each tag
index is represented by the related bit in an 32bit unsigned int
mask, thus the first tag is the 1st bit in the 32bit unsigned
int mask, and so forth. An enabled tag means the bit is set (1),
a disabled tag means the bit is not set (0).

 0 means, no tags are assigned
 1 << n means, the n-th tag is assigned
 (1 << n) | (1 << m) means, the n-th and m-th tag is assigned
 ~0 means, all tags are assigned (~ means bitwise not, thus ~0 == 11111111...)

The same mechanism is used for arguments to tag(), toggletag(),
view(), and toggleview(), see the Key-definitions for details.

See for further

I hope this helps.

Kind regards,

 Anselm R. Garbe >< >< GPG key: 0D73F361
Received on Sun Jun 15 2008 - 23:40:37 UTC

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