schischi-a/xcwd — pull request #3 by jebaum (2013-05-24 03:51:42+00:00)
Title: add option to set custom fallback directory

This commit adds an option for the user to pass a parameter to xcwd that will be used as the fallback directory if it can't find the working directory of the focused window. If no parameter is passed, the $HOME environment variable is used like before.

This is useful for urxvtd/urxvtc, since the "-cd" option passed to urxvtc is interpreted in the context of the daemon. This means that the $HOME environment variable for the daemon is most likely "/", which is probably not where new terminals should open. Invoking xcwd with a line like:
xcwd /home/USERNAMEHERE
prevents that from happening.