[xmonad] Re: Problem running Xmonad

Devin Mullins me at twifkak.com
Wed Sep 24 00:24:48 EDT 2008

> >        [((m .|. mod4Mask, k), windows $ f i)
> >          | (i, k) <- zip (workspaces gnomeConfig) [xK_KP_1 .. xK_KP_9]
> >          , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
> > 


>  - m .|. is modifier of keys 
m is a modifier bitmask -- 0 means nothing pressed, shiftMask means
shift pressed. m .|. n is the combination of two modmasks -- in this
case m .|. mod4Mask means "mod4 and m held down". Here, mod4 corresponds
to W.greedyView, mod4-shift corresponds to W.shift.

>  - k is keysym (?)
Yes. See:
  ~$ ghci
  GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
  Loading package base ... linking ... done.
  Prelude> import XMonad
  Prelude XMonad> :i xK_KP_1
  xK_KP_1 :: KeySym   -- Defined in Graphics.X11.Types
If you search the internets, you'll find documentation for the Types
module, including a list of all the KeySyms. (Assuming it's up to date.)

>  - windows is a function that activate some window
>  - f is activation mode (?)
windows is a bit of a magical function. It converts a pure StackSet
mutator into an X action. In other words, f is all the business logic
that says "move this window here" and so on, and windows is the dirty
greasy implementation that actually interacts with X.

In this case, f is either W.greedyView or W.shift. See StackSet
documentation or source code for info.

>  - i is window number extracted from gnome
i is the window number extracted from xlib. See `xprop`, for example.

> The given setting does not work. On my keyboard, 1 is over '&', so maybe I could
> try xK_K_AMP (or something similar) ?
What Brandon said.

More information about the xmonad mailing list