[xmonad] Add 'browser' to XConfig
David Roundy
droundy at darcs.net
Mon Mar 31 14:28:21 EDT 2008
On Mon, Mar 31, 2008 at 09:24:42PM +0300, Roman Cheplyaka wrote:
> * David Roundy <droundy at darcs.net> [2008-03-31 11:12:51-0700]
> > On Mon, Mar 31, 2008 at 07:51:31PM +0300, Roman Cheplyaka wrote:
> > > * David Roundy <droundy at darcs.net> [2008-03-31 09:05:33-0700]
> > > > On Mon, Mar 31, 2008 at 06:21:35PM +0300, Roman Cheplyaka wrote:
> > > > > * David Roundy <droundy at darcs.net> [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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/xmonad/attachments/20080331/657b6b3b/attachment.bin
More information about the xmonad
mailing list