Restore higher priority to awful.rules
I think fixes #70, but the reporter claim it doesn't. At least it mostly fixes it.
This commit is contained in:
parent
bafe3b6bf1
commit
5a03f76cc3
21
init.lua
21
init.lua
|
@ -374,18 +374,8 @@ capi.client.disconnect_signal("manage",awful.spawn.on_snid_callback)
|
||||||
|
|
||||||
--- Replace the default handler to take into account Tyrannical properties
|
--- Replace the default handler to take into account Tyrannical properties
|
||||||
function awful.rules.apply(c)
|
function awful.rules.apply(c)
|
||||||
local low_i = string.lower(c.instance or "N/A")
|
|
||||||
local low_c = string.lower(get_class(c))
|
|
||||||
|
|
||||||
local callbacks, props = {}, {}
|
local callbacks, props = {}, {}
|
||||||
|
|
||||||
local props_src = (c_rules.instance[low_i]
|
|
||||||
or c_rules.class[low_c] or {}).properties
|
|
||||||
or {}
|
|
||||||
|
|
||||||
-- Add Tyrannical properties
|
|
||||||
awful.util.table.crush(props,props_src)
|
|
||||||
|
|
||||||
-- Add the rules properties
|
-- Add the rules properties
|
||||||
for _, entry in ipairs(awful.rules.matching_rules(c, awful.rules.rules)) do
|
for _, entry in ipairs(awful.rules.matching_rules(c, awful.rules.rules)) do
|
||||||
awful.util.table.crush(props,entry.properties or {})
|
awful.util.table.crush(props,entry.properties or {})
|
||||||
|
@ -395,6 +385,17 @@ function awful.rules.apply(c)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- In case the class is overwriten
|
||||||
|
local low_c = props.overwrite_class or string.lower(get_class(c))
|
||||||
|
local low_i = string.lower(c.instance or "N/A")
|
||||||
|
|
||||||
|
-- Add Tyrannical properties
|
||||||
|
local props_src = (c_rules.instance[low_i]
|
||||||
|
or c_rules.class[low_c] or {}).properties
|
||||||
|
or {}
|
||||||
|
|
||||||
|
awful.util.table.crush(props,props_src)
|
||||||
|
|
||||||
-- Add startup_id overridden properties
|
-- Add startup_id overridden properties
|
||||||
if c.startup_id and awful.spawn.snid_buffer[c.startup_id] then
|
if c.startup_id and awful.spawn.snid_buffer[c.startup_id] then
|
||||||
local snprops, sncb = unpack(awful.spawn.snid_buffer[c.startup_id])
|
local snprops, sncb = unpack(awful.spawn.snid_buffer[c.startup_id])
|
||||||
|
|
Loading…
Reference in New Issue