[xmonad] normal (rather than greedy) view: disable screen-focus switching?

Lara Michaels laramichaels1978 at yahoo.com
Fri Sep 17 06:04:24 EDT 2010


Hello! Many thanks for your help.

> There may be a contrib module for this. I don't know. In
> any case, some untested code follows:
> 
> isVisible w ws = any ((w ==) . tag . workspace) (visible
> ws)
> lazyView  w ws = if isVisible w ws then ws else view w
> ws
> 
> You can then use lazyView exactly as you would use view or
> greedyView (it should have the same type). 

I must be placing this code in the wrong part of my xmonad.hs file. I edited the 'main' segment so that it reads:

main = xmonad $ ewmh gnomeConfig {
        manageHook = manageHook gnomeConfig <+> composeAll myManageHook,
        workspaces = myWorkspaces,
        modMask = mod4Mask, -- makes all xmonad shortcuts be "Windows key + X" (thus not interfering with any app's)
        borderWidth        = 3,
        normalBorderColor  = "#cccccc",
        focusedBorderColor = "#cd8b00",
        layoutHook = showWName myLayout,
        isVisible w ws = any ((w ==) . tag . workspace) (visible ws),
        lazyView  w ws = if isVisible w ws then ws else view w ws
        }
        `additionalKeysP` myKeys

but I get an error message saying 

xmonad.hs:59:11: parse error on input `w'

where line 59 is the one defining (?) isVisible. If someone knows what I am doing wrong, that would be great.

Many thanks!
~l



      


More information about the xmonad mailing list