-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 27.03.2011 17:33, Anurag Priyam wrote:
> On Sun, Mar 27, 2011 at 8:15 PM, Uli Schlachter <[email protected]> wrote:
>> I'd propose a name which actually explains what this does, e.g. "except",
>> "ignore", "skip".
>
> Changed to 'except'.
Thanks, that one sounds better to me. :-)
However, you forgot to do the same change in the commit message:
> { rule = { class = "Firefox" },
> rule_no = { instance = "Navigator" },
> properties = {floating = true},
> }
And now for the matching logic:
> @@ -124,8 +137,8 @@ function apply(c)
> local props = {}
> local callbacks = {}
> for _, entry in ipairs(rules) do
> - if (entry.rule and match(c, entry.rule)) or
> - (entry.rule_any and match_any(c, entry.rule_any)) then
> + if (match(c, entry.rule) and not match(c, entry.except)) or
> + (match_any(c, entry.rule_any) and not match_any(c,
> entry.except)) then
I wonder if it would make sense to explicitly have "except" and "except_any". So
the if would become something like this:
if (match(c, entry.rule) or match(c, entry.rule) and
(not match(c, entry.except) and not match_any(c, entry.except_all) then
That way, I could e.g. make a rule like this:
- -- Make all clients except <foo> floating:
{ rule = {}, except_any = { class = { "MPlayer", "Nitrogen" } },
properties = { floating = true } }
I know that one can already do this today via first making everything floating
and then un-floating the ones that shouldn't be floating, but perhaps it does
make sense to be able to merge that into a single rule.
What do you think?
Cheers,
Uli
- --
The Angels have the phone box!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEcBAEBCAAGBQJNj3XhAAoJECLkKOvLj8sGv8UH/1L3aWadOl52kGID+I6GhJZZ
0rOzfr8IW4XHkc87jFwz6sUa4Y4Lf0POGTydKR2Kh+mUKb/T2l+R3AfGZgWLA2UA
wYp7RbnvwgpuwFHSGErxfIELBitZUeMVws6Vq7iZSX37x6OTgIpyyZR5myi30F3t
+vWsMZoIY+KgvJHy2gYUw/sOEYwdo/Lx+5KegE7VPGru01SmNVsdsTqr2qC/ALxf
udyuCy2jWyCjZr9JJiHA2sPoIvStOzKmQ8APO4n53XfodCkvwzn14k178otXBCrd
H1PbVZRkRRFw0gJoDb4Xz0PpxUQxDrqwdNzYvQIkqChV8HYdisYu2W5v5I2eCFQ=
=jKDo
-----END PGP SIGNATURE-----
--
To unsubscribe, send mail to [email protected].