[xmonad] Use regexps for className matching?

Henri Ducrocq henri.ducrocq at gmail.com
Tue Feb 10 20:59:17 EST 2009


Thanks guys, that's even more solutions than I need.

On Mon, Feb 9, 2009 at 4:38 PM, Wirt Wolff <wirtwolff at gmail.com> wrote:

> Excerpts from Henri Ducrocq's message of Mon Feb 09 06:41:41 -0700 2009:
> > For example
> >   className =? "Google Mail"  --> doShift "1"
> >   className =? "Google Calendar"  --> doShift "1"
>
> can become:
>
> import Data.List
>
>    -- skipped
>    fmap ("Google" `isPrefixOf`) className --> doShift "1"
>
> Also from Data.List are isSuffixOf and isInfixOf if you need those.
>
> > "bc" `isInfixOf` "abcdef"
> True
>
> > "bc" `isInfixOf` "bcdef" && "bc" `isInfixOf` "abc"
> True
> --
> wmw
> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://www.haskell.org/mailman/listinfo/xmonad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/xmonad/attachments/20090211/506c8818/attachment.htm


More information about the xmonad mailing list