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

wagnerdm at seas.upenn.edu wagnerdm at seas.upenn.edu
Fri Sep 17 11:29:31 EDT 2010


It should look like this instead:

isVisible w ws = any ((w ==) . tag . workspace) (visible ws)
lazyView  w ws = if isVisible w ws then ws else view w ws

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
         }
         `additionalKeysP` myKeys

Good luck,
~d

Quoting Lara Michaels <laramichaels1978 at yahoo.com>:

> 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
>
>
>
>
> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://www.haskell.org/mailman/listinfo/xmonad
>
>



More information about the xmonad mailing list