From f2872190d57e8ebbb6d949826dd02e5d89805032 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 08701b6f..1bbede2d 100644 --- a/lib/naughty.lua.in +++ b/lib/naughty.lua.in @@ -509,17 +509,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