More config changes in r2089

Extended matching
Added by Christoph Kappel almost 4 years ago

Over the time the complexity of tag properties steadily increased, it was time for a change. The new format combines regex and match properties and also adds the possibility to add more than one match to a tag.

Old configs are still useable, if there is a regex property found it will be used and a deprecation warning yielded.

Also it is now possible to set window types to tags, so subtle will treat this window as a window of specific type, e.g. as a desktop type window.

Here is a brief overview of the changes:

Old

 1 tag "test1" do
 2   regex "test1" 
 3   match [:role]
 4 end
 5 
 6 tag "test2" do
 7   regex "test2" 
 8   match [:instance, :class]
 9 end
10 
11 tag "test3a" do
12   regex "test3a" 
13 end
14 
15 tag "test3b" do
16   regex "test3b" 
17   match [:name]
18 end

New

 1 tag "test1" do
 2   match :role => "test1" 
 3 end
 4 
 5 tag "test2" do
 6   match [:instance, :class] => "test2" 
 7 end
 8 
 9 tag "test3" do
10   match "test3a" 
11   match :name => "test3b" 
12 end

And finally the type works like this:

1 tag "type" do
2   type :desktop
3 end

A complete list and updated docs can be found here.


Comments