
On 27 October 2012 14:24, Brandon Allbery
One possibility is
className =? "Xfce4-panel" <&&> fmap (\t -> any (== t) ["Panel", "Add New Items", ...]) title
I wasn't so lost, I was somehow close. I'm still trying to learn lambdas.
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
Thanks, this looks a little better and elegant. I still have a lot to learn D:
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.
It's a good idea because gives more control. Thanks for your suggestion.
On 27 October 2012 16:59,
How about this?
floatPanel t = className =? "Xfce4-panel" <&&> title =? t --> doFloat
and then, in your manage hook,
composeAll [ floatPanel "Panel", floatPanel "Add New Items", .... ]
Of course floatPanel can be generalized or specialized in a couple million different ways, depending on exactly what you want to do. ~d
Thanks, I never thought in doing something like that, I should've been able to do it, well... there's still a lot to learn. Thanks both of you! (again :P) Regards, -- Pablo Olmos de Aguilera Corradini - @PaBLoX http://www.glatelier.org/ http://about.me/pablox/ http://www.linkedin.com/in/pablooda/ Linux User: #456971 - http://counter.li.org/