Extended application matching #10

merged 1 commit into from Mar 23, 2012


None yet

3 participants


I made it possible to match for specific attributes like class and instance. Now application rules as follows are possible:

    match = {
        class = {
    float = true,
    intrusive = true,
@masterkorp masterkorp was assigned Mar 21, 2012
bioe007 commented Mar 21, 2012

This would close issue #2

I'm in favor but need to rewrite the readme and wiki

I can probably manage that this week, unless someone else will :)

Perhaps even a message in awesome mailing list.

@bioe007 bioe007 referenced this pull request Mar 21, 2012

improve matching granularity #2


Ok, gave a look at the code. Its nice. Will test it on my setup and documente on the readme and wiki.

@masterkorp masterkorp commented on the diff Mar 23, 2012
- end
- if a.geometry ~=nil then
- geom = {x = a.geometry[1],
- y = a.geometry[2],
- width = a.geometry[3],
- height = a.geometry[4]}
- end
- if a.float ~= nil then float = a.float end
- if a.slave ~=nil then slave = a.slave end
- if a.border_width ~= nil then
- c.border_width = a.border_width
+ local matched = false
+ -- match only class
+ if not matched and cls and a.match.class then
+ for k, w in ipairs(a.match.class) do
+ matched = cls:find(w)
masterkorp Mar 23, 2012 Collaborator

I personally dont like this syntax sugar things. It s inconsistent in this library tough. So i guess it OK.

bioe007 Mar 26, 2012 Owner

You mean the colon for member functions? I would say there is a lot of other ugliness in the code...

w0w.. didn't even know we could do this commenting in lines. O.O

masterkorp Mar 26, 2012 Collaborator

Yeah its pretty sweet to discuss code :D

@masterkorp masterkorp merged commit 48a220f into bioe007:master Mar 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment