diff options
author | Adrien Schildknecht <adrien+dev@schischi.me> | 2013-04-24 21:16:36 +0200 |
---|---|---|
committer | Adrien Schildknecht <adrien+dev@schischi.me> | 2013-04-24 21:16:36 +0200 |
commit | 3b3812b453aefc6fdb53886a76a66f96f3cb1688 (patch) | |
tree | 7e685ee4be799906ecccfb63ec5152a55d8168b9 | |
parent | 913c08b9aca6680ed8caffec4de098c6c007892e (diff) |
update the readme
-rw-r--r-- | README.md | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -6,6 +6,20 @@ The main goal is to launch applications directly into the same directory as the focused applications. This is especially useful if you want to open a new terminal for debugging or compiling purpose. +How does it works +----------------- +Since there is no proper options to get the pid of the currently focused +windows, +xcwd first try to read the \_NET\_WM\_PID property. If it fails, it reads the +\_NET\_WM\_CLASS and compares it to the name of all the processes (it's kind of +`pidof name`). + +When xcwd has got the PID, it search the deepest child he has, thus avoiding +getting the working directory of the terminal emulator instead of the shell. + +Finally it prints the content of `/proc/pid/cwd` on the standard output. If +xcwd was unable to find the PID, it prints the content of the HOME variable. + Requirements ------------ - libX11-dev |