
On Mon, Mar 31, 2008 at 11:28:21AM -0700, David Roundy wrote:
On Mon, Mar 31, 2008 at 09:24:42PM +0300, Roman Cheplyaka wrote:
* David Roundy
[2008-03-31 11:12:51-0700] On Mon, Mar 31, 2008 at 07:51:31PM +0300, Roman Cheplyaka wrote:
* David Roundy
[2008-03-31 09:05:33-0700] On Mon, Mar 31, 2008 at 06:21:35PM +0300, Roman Cheplyaka wrote:
* David Roundy
[2008-03-31 07:58:52-0700] > If you prefer, we could alternately support XMONAD_BROWSER. Note that > putting the browser in the environment would also make it immediately > runtime-configurable (well, with a few lines of code in contrib). How do you see it?
I'm not sure what you're asking. You'd just start a terminal and then run echo $BROWSER to see what the value is.
Sorry, I was in hurry. I mean, how do you see runtime configuration of some environment variable, like BROWSER? If xmonad is up and running, I see no way to change its environment from outside. Even restarting it (mod-q) doesn't seem to allow this.
We'd just define a little prompt module, and then do something like
setEnv "BROWSER" "new value" True
This would also solve my problem with connecting a new ssh-agent to xmonad (and thus to new terminals started by xmonad).
Ah, that will work. But if we introduce global configuration variable, it's weird to configure it specially for xmonad.
I never said you had to introduce a global configuration variable for xmonad, I said you could do so if you wanted.
I'd propose you to make symlink somewhere in your $PATH (like $HOME/bin/x-www-browser) which would point to your preferred browser. And this solution would allow truly runtime configuration.
Now that truly is a global solution, that can't be runtime configured in any sort of flexible way (e.g. if you wanted to use two different browsers on different machines that share a home directory). Much nicer to use environment variables, which are per-process, rather than global variables like symlinks. -- David Roundy Department of Physics Oregon State University
$HOME/bin/x-www-browser could easily be a script that consults an environment variable and executes that.