Re: [dwm] Help with the tags mask syntax

From: Filippo Erik Negroni <f.e.negroni_AT_googlemail.com>
Date: Sun, 10 Aug 2008 21:16:31 +0100

2008/8/10 Giorgio Lando <patroclo7_AT_gmail.com>:
> Hi, I have been a long term dwm 4.7 user and I have now updated to 5.1.
> So far everything goes extremely well, but I do not understand how the
> tags mask in config.h works. I have looked in this mailing list for
> examples, but I am not able to grasp their logic.
> I have verified that I can force a window class in a certain tag n
> masking all the tags till n-1: so to emulate the old tag regex 9 I have
> to put 1 >> 8 as a tag mask.
> But how I force a window class in the first tag? Also, how masking a
> certain tag pushes a window class in a certain other (for example if I
> use 4 as the tag mask for the windows related to emesene, those windows
> take the tag 3; why?).
> I have also seen some config.h including three digits values for the tag
> mask (such as 200) or using two values with a -. Could someone be so
> kind to explain me from a general point of view the syntax of the tag
> mask?

Hi Giorgio,

The tag mask is exactly that, a mask: it is not the number of the tag
to use, but a mask that modifies the bits in the tag number.
The tag mask number in config.h is therefore a 'bit-mask': if you use
decimal '4' as the tag mask, the 'bit-mask' becomes bits
0-0-0-0-0-1-0-0, which when applied, indicates we want the third tag
(the 1 in the third bit from the right) to be selected, hence tag '3'.
I will try and post examples in the 'customisation' link on the wiki
tomorrow, for the general public.
Received on Sun Aug 10 2008 - 20:16:31 UTC

This archive was generated by hypermail 2.2.0 : Sun Aug 10 2008 - 20:24:04 UTC