Xmonad open terminal in same directory

That doesn't really answers your question, but I have an alternative that can save your time and solve your problem: autojump

This is a software that saves your habits when navigating between folders in the terminal. Every time you cd in a folder, it increase the associated likelihood. For example on my system it has now something like:

343368.3820292514   /home/fb
66.1004508305352    /home/fb/documents
65.2439790325514    /home/fb/workspace/MyProject
55.78935025659235   /very/long/path/boring/to/join/Folder
51.78935025659235   /home/fb/master-thesis
49.150383518340945  /usr/share/opencv
43.1282216187962    /home/fb/.dotvim
...

Then afterward, when you want to go in a folder, you can give only a part of the name and it will go to the most probable folder that corresponds. Usually the command j is associated with autojump. For instance in your case the usage will be as follow.

  1. Open a terminal
  2. (First time only) Go with cd to the folder /very/long/path/boring/to/join/Folder
  3. Do some work
  4. Later, when you need another terminal, open a new one
  5. Entering j fol<ENTER> will bring your directly to /home/fb/very/long/path/boring/to/join/Folder

Of course this only work if the folder you want to join is a folder where you often go.


I haven't messed with the defaults much and ctrl+shift+n does it for me.

Tags:

Xmonad