Updated tag handling
Replaced exclude matching by logic AND
Tagging is a double edged sword, some windows especially terminals are really difficult to tag, because they usually retain their class value like URxvt and all tags that include urxvt match every instance. To make this easier there is the exclude match to sort this cases out.
Exclude was just a mere hack, hence in r2813 this hack is replaced by a more sophiscated way. Matching values can now be combined in a logic AND fashion.
Following example, there are two terminals, one urxvt and one xterm with following data:
0x600009 * 0 0 x 408 + 796 + 388 bottom ---- foo (URxvt) 0x800022 * 0 0 x 16 + 796 + 388 top ---- foo (XTerm)
Matching both windows is easy based on the class, but difficult based on the instance name.
tag "test1" do match :instance => "test" exclude :class => "XTerm" end tag "test2" do match :instance => "test" exclude :class => "XTerm" end
tag "test" do match :instance => "test", :class => "urxvt" end
Too make long story short: Match allows to combine different values for a finer grained control.
Update: The removal of the exclude option lead to confusion, in fact in all cases the option was horribly misused. The correct way is to match the clients that should be tagged and not match all and exclude some.
tag "terms" do match "urxvt" exclude "irssi|ncmpcpp|ranger" end
tag "terms" do match :instance => "urxvt" end