Extended application matching #10

Merged
merged 1 commit into from Mar 23, 2012

3 participants

@TheMarex

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

{
    match = {
        class = {
            "Do",
        },
        "clock%-applet",
    },
    float = true,
    intrusive = true,
},
@masterkorp masterkorp was assigned Mar 21, 2012
@bioe007
Owner

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
Closed

improve matching granularity #2

@masterkorp
Collaborator

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
Collaborator
masterkorp added a line comment Mar 23, 2012

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

@bioe007
Owner
bioe007 added a line comment Mar 26, 2012

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
Collaborator
masterkorp added a line comment Mar 26, 2012

Yeah its pretty sweet to discuss code :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@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