Thanks for your reply, Chris:

On 10/18/13 at 05:22pm, Chris Down wrote:
> You should include the project you're referring to in your subject, otherwise
> we have to guess what you're talking about. I guess this is about dwm, but
> still...

Of course! I'm sorry; I confess this is "the dwm and dmenu list" for me, which
explains, but doesn't excuse, my forgetfulness.

> 
> On 2013-10-18 11:14, Manolo Martínez wrote:
> > Still, I wonder, wouldn't it be possible to use config.h to bind a key
> > combination to, say, "urxvt -cd $PWD", or "pwd | urxvt", or "urxvt -cd
> > `pwd`". None of these options work, and I am not sure why -- I guess pipes
> > cannot be used? And env variables are somehow not read?
> 
> These are all shell syntax, exec() and friends won't interpret them. Have them
> interpreted by a shell if you want it to work.

All right, thanks.

> 
> Secondly, you never make it clear *who's* working directory you want to read.
> Do you always want to be in dwm's working directory? The working directory 
> from
> the environment you are currently in (which may not be the same as dwm's)?

I meant the current user's (i.e., my) working directory. What "echo
$PWD" shows.
> 
> Also, urxvt(c) does not change the current working directory on launch, 
> anyway.
> You can see this quite easily by launching an urxvt instance, and then doing
> `cd / && urxvt`. The new instance will have / as its current working 
> directory.

I actually knew that, and it puzzles me. In my config.h I have the following 
line:

    static const char *termcmd[]  = { "urxvt", NULL };

Which always launches a terminal in /home/manolo, regardless of what my
current pwd is.

Cheers,
Manolo

Attachment: pgpW8bByVyzaV.pgp
Description: PGP signature

Reply via email to