On Sat, Oct 27, 2012 at 1:07 PM, Pablo Olmos de Aguilera C. <pablo@glatelier.org> wrote:
    composeAll
    [ className =? "Xfce4-panel" <&&> title =? "Panel"          --> doFloat
    , className =? "Xfce4-panel" <&&> title =? "Add New Items"  --> doFloat
    ......
    ] <+>

Which strategy should I use to make the same className applies to
different titles?

One possibility is

    className =? "Xfce4-panel" <&&> fmap (\t -> any (== t) ["Panel", "Add New Items", ...]) title

This can probably be made prettier.

    matchAny :: Eq a => Query a  -> [a] -> Query Bool
    matchAny t ts = fmap (\s -> any (== s) ts) t

    className =? "Xfce4-panel" <&&> matchAny title ["Panel", "Add New Items", ...] --> doFloat

Another possibility, depending on exactly what you're trying to do, is

    className =? "Xfce4-panel" -->
      composeAll [title =? "Panel" --> doFloat
                 ,title =? "Add New Items" --> doFloat
                 ]

and then rearrange the inner composeAll in various ways.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix/linux, openafs, kerberos, infrastructure          http://sinenomine.net