
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 Thanks for help -- Dominik Bruhn mailto: dominik@dbruhn.de

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...

Hy, thanks for your answer but it didnt help. I changed the line to: -- ((modm, xK_space), scratchpadSpawnAction =<< dbruhnConfig), -- and I get a haskell-error. I attached my Config-File and the error-log. Thanks for anybody who can help. Dominik On Wed, Sep 24, 2008 at 10:09:53AM -0700, Devin Mullins wrote:
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... _______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
-- Dominik Bruhn mailto: dominik@dbruhn.de

On Thu, Sep 25, 2008 at 07:06:19PM +0200, Dominik Bruhn wrote:
Hy, thanks for your answer but it didnt help. I changed the line to: -- ((modm, xK_space), scratchpadSpawnAction =<< dbruhnConfig), --
and I get a haskell-error. I attached my Config-File and the error-log.
Ah, that's because your config changed since you last posted. Before, it was Monad m => m (XConfig l), and now it's IO (XConfig l). Also, you definitely don't want to =<< twice as that'll spawnPipe twice, which will probably lead to blockage. Do this:
mykeys conf@(XConfig {modMask = modm}) = M.fromList $ [ .... ((modm, xK_space), scratchpadSpawnAction conf),

Hy, that worked, thanks! On Fri, Sep 26, 2008 at 07:05:12AM -0700, Devin Mullins wrote:
On Thu, Sep 25, 2008 at 07:06:19PM +0200, Dominik Bruhn wrote:
Hy, thanks for your answer but it didnt help. I changed the line to: -- ((modm, xK_space), scratchpadSpawnAction =<< dbruhnConfig), --
and I get a haskell-error. I attached my Config-File and the error-log.
Ah, that's because your config changed since you last posted. Before, it was Monad m => m (XConfig l), and now it's IO (XConfig l). Also, you definitely don't want to =<< twice as that'll spawnPipe twice, which will probably lead to blockage.
Do this:
mykeys conf@(XConfig {modMask = modm}) = M.fromList $ [ .... ((modm, xK_space), scratchpadSpawnAction conf),
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
-- Dominik Bruhn mailto: dominik@dbruhn.de
participants (2)
-
Devin Mullins
-
Dominik Bruhn