[xmonad] Re: Use regexps for className matching?
mail at justinbogner.com
mail at justinbogner.com
Mon Feb 9 11:20:29 EST 2009
Henri Ducrocq <henri.ducrocq at gmail.com>
writes:
| For example
| className =? "Google Mail" --> doShift "1"
| className =? "Google Calendar" --> doShift "1"
| would become
| className <some regexp matching operator> "Google .*" doShift "1"
|
| How to do this in Haskell? I couldn't find any examples of this in the config
| archive..
You can use one of the haskell regex libraries and define an operator
for the managehook like so:
> import Text.Regex.Posix ((=~))
>
> q ~? x = fmap (=~ x) q
and then your example is simply
> className ~? "Google .*" --> doShift "1"
More information about the xmonad
mailing list