[xmonad] defaultConfig?

Devin Mullins me at twifkak.com
Wed Sep 24 13:09:53 EDT 2008


On Wed, Sep 24, 2008 at 06:12:31PM +0200, Dominik Bruhn wrote:
> Hy,
> currently I use the following config:
> 
> -- snip --
> main = xmonad =<< dbruhnConfig
> 
> dbruhnConfig = do
>     return $ withUrgencyHook NoUrgencyHook  $ defaultConfig {
>         ...
>         terminal = "urxvtc", 
>         keys = \c -> mykeys c `M.union` keys defaultConfig c,
>         ...
>     }
>     where
>         mykeys (XConfig {modMask = modm}) = M.fromList $ [
>             ....
>             ((modm, xK_space), scratchpadSpawnAction defaultConfig),
>             ...
>             ]
> --- snip ------
> 
> The problem now is: the scratchpadSpawnAction takes the terminal out of the
> config. But as I provide the default-Config (which uses xterm) instead of my own
> config as parameter to the action the wrong terminal gets open.
> 
> What is the replacement for defaultConfig if I want to tell "this" (speaking
> Java) or "self" (speaking Python). I tried writing "dbruhnConfig" there but this
> lead into a strange haskell-error

Because you're using do/return, the type of dbruhnConfig is Monad m => m
(XConfig l), so you'd need to say scratchpadSpawnAction =<<
dbruhnConfig. Alternatively, get rid of the do/return as it's
extraneous.

What you're actually supposed to pass to scratchpadSpawnAction is the
XConfig that is the parameter to mykeys. Change that to mykeys
conf@(XConfig...


More information about the xmonad mailing list