At 1252338759 time_t, TheSighter wrote:
> I had made some addidionts in thsi hook. For example i added a check for
> the icon-name of an application.
> 
> So my problem is that i can't find any place in the rc.lua where the
> awful.rules-table is read out, like in the old manage.register hook.
> 
> can I simply add this check to the signal-function?

I'm not sure I understand what you mean, but I'll try to explain from
what I understand. :)

When a new client is managed, the "manage" class signal is emitted.
The function awful.rules.apply is registered to be execcuted upon that
signal is emitted.

If you want to use awful.rules but add more stuff, the best way to do
it is to first unregister it:
client.remove_signal"manage", awful.rules.apply)

Then, register your own function
client.add_signal("manage", my_rule_function)

In my_rule_function, you can do whatever you want like:

function my_rule_function(c, startup)
    -- apply awful.rules
    awful.rules.apply(c)
    -- Do the stuff you want.
    -- bla()
end

Cheers,
-- 
Julien Danjou
// ᐰ <[email protected]>   http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD
// And thinking so much differently.

Attachment: signature.asc
Description: Digital signature

Reply via email to