Detect and match windows to a set of rules
