On 2013-10-18 12:03, Manolo Martínez wrote:
> > I guess what you want is the pwd of the client that currently has
> > focus… I also need something like that for plumb(1)ing purposes
>
> That's probably what I want, yes. Thanks.

Environments only propagate to children, not their parents. You'll need to get
the pwd of the currently focussed window if you want to do that.

> Well, the following mouthful does it in fish (mutatis mutandis for other
> shells):
>
>     pwdx (xdotool getwindowpid (xdotool getwindowfocus))

POSIXly:

    pwdx "$(xdotool getwindowpid "$(xdotool getwindowfocus)")"

It seems pwdx is part of procps-ng.

Attachment: pgpU2pjexEXo3.pgp
Description: PGP signature

Reply via email to