[xmonad] ManageHook question
sean at monkeysnatchbanana.com
Sat Mar 5 16:22:01 CET 2011
I'm constantly amused by what haskell I can figure out to get stuff
working in and what I can't.
I'm going to dig deeper into your explanation and hopefully really
On Sat, Mar 5, 2011 at 2:45 AM, Brandon S Allbery KF8NH
<allbery.b at gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> On 3/5/11 02:28 , Sean Allen wrote:
>> title =? 'downloads' --> doIgnore
>> but instead of exactly matching title against 'downloads' we want to
>> run the doIgnore for any window whose title contains 'downloads'.
> It's kinda ugly:
> ("downloads" `isInfixOf`) `fmap` title --> doIgnore
> or equivalently
> fmap (isInfixOf "downloads") title --> doIgnore
> More generally, to apply a comparison operation of some kind to a Query
> string, use "fmap" to run it "inside" the Query. So you can read the first
> version somewhat naturally as 'run ("downloads" `isInfixOf` x) with "x"
> being the string inside of "title"'.
> (You will probably need "import Data.List (isInfixOf)" at the top of your
> - --
> brandon s. allbery [linux,solaris,freebsd,perl] allbery.b at gmail.com
> system administrator [openafs,heimdal,too many hats] kf8nh
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> -----END PGP SIGNATURE-----
> xmonad mailing list
> xmonad at haskell.org
More information about the xmonad