I'm trying to set up a prompt to dynamically change environment variables (say, http_proxy).

I'm using Prompt.Input (inputPrompt) to query for values such as "VAR=val" and passing those along to putEnv. The problem is when I start a new terminal using the standard mod+shift+enter the environment does not have VAR=val in it.

Is there something I'm missing about how XMonad forks processes and passes along exported values? The only place putEnv seems to work is main, which is not dynamic.

updateEnvVar :: String -> X ()
updateEnvVar s = catchIO $ putEnv s

defaultConfig { ... } `additionalKeysP` [
  ("M-e", inputPrompt myPromptConfig "set env" ?+ updateEnvVar)
]


Thanks for any help