Subject: The Read command (expanding $HOME)

From: Tomas Ogren <[email-masked]>
Date: Tue, 30 May 2000 00:15:39 +0200

Helo.

I hadn't updated cvs since february and when I just did, I had no
settings.. So I started to dig in why it failed..

My main fvwm2rc just reads a bunch of other files, all with relative
paths (.X/fvwm2/foo) .. with the new FVWM_USERDIR pointing at
$HOME/.fvwm I know why it failed.. I can accept that..

So I thought "Ok, I'll change it to Read $HOME/.X/fvwm2/... " .. but
that didn't work.. it didn't expand $HOME .. I haven't had a look at the
parsing code, but how hard would it be to expand $HOME into what it is?

I'd like not to hard code paths since people are copying my settings to
the right and left and it's best if they run their own copy...

/Tomas
-- 
Tomas Ögren, [email-masked], http://www.ing.umu.se/~stric/
|- Student at Computing Science, University of Umeå
`- Sysadmin at {cs,ing,acc}.umu.se
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 30 May 2000 02:50:21 +0200

> parsing code, but how hard would it be to expand $HOME into what it is?

None at all.  I was just going to commit a patch when I saw your
mail.  Try '$[HOME] with your next update.

> the right and left and it's best if they run their own copy...

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 30 May 2000 17:50:12 +0300

> $HOME/.fvwm I know why it failed.. I can accept that..

I asked whether Read should specially support $HOME, noone answered.
Probably it is not good to encourage user to count from ~, not ~/.fvwm.
In your case, instead of changing any rc, you can just execute:

	ln -s $HOME/.X $HOME/.fvwm/.X

> the right and left and it's best if they run their own copy...

Even more, for me 'Read $HOME/.X/fvwm2/...' for every included file is
also hard-coding. I had the following in my queue of things to implement:
special vars $. and $~. It seems that Dominik implemented $[HOME], so the
second is not really needed now, but the first is needed for many things.

So you will be able to put all your files in one directory and Read only
the main include, all other files are read from the main one like:

  Read $./include1     # $. is substituted with "/home/stric/.X/fvwm2"
  Read $./include2     # - the directory of this rc file

Other usages, which are also impossible without hard-coding:

  *FvwmEvent add_window $./sounds/add_window.au
  ImagePath $./images:+
  Exec exec xv -root -rmode 2 -quit $./images/myimage.jpg

Now you can move or rename your .X/fvwm2 directory to anywhere, you only
need to change one place - Read of the main include, and everything will
still work as expected. As you can guess this is required for themes.

I will implement $. soon (small patch) unless there are any objections.

Regards,
Mikhael.