From 87ce51d2e97df531ec7eed73beef59613d4cadda Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 27 Dec 2011 11:23:51 +0100 Subject: [PATCH] naughty: remove score system, merge presets Scoring is broken, it's more useful to merge all presets, and declares that order matters. --- lib/naughty.lua.in | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in index f7e52717..86f1b721 100644 --- a/lib/naughty.lua.in +++ b/lib/naughty.lua.in @@ -484,17 +484,12 @@ if capi.dbus then return end end - local score = 0 for i, obj in pairs(config.mapping) do local filter, preset, s = obj[1], obj[2], 0 if (not filter.urgency or filter.urgency == hints.urgency) and (not filter.category or filter.category == hints.category) and (not filter.appname or filter.appname == appname) then - for j, el in pairs(filter) do s = s + 1 end - if s > score then - score = s - args.preset = preset - end + args.preset = util.table.join(args.preset, preset) end end if not args.preset.callback or (type(args.preset.callback) == "function" and