You are not logged in.

#1 2013-05-03 00:45:13

schischi
Member
From: Paris, France
Registered: 2013-05-01
Posts: 2

xcwd, launch a terminal with the same path

Hi,

As a i3 user, I do not really use tmux or urxvt-tabbed anymore to manage my tabs.
But I really miss the fact that tmux open a new shell on the same directory as the previous one.
To emulate this feature, I wrote a simple C program which print the current working directory of the focused window so you can do things like that:

urxvt -cd `xcwd`

There is no proper way to get the working directory of a window, so it uses many tricks and may not give you the path you want on every applications.
Anyway, it seems to work in most cases unless your terminal contains a tab manager (tmux, screen, urxvt-tabbed).

Since there is a lot of tiling-wm users here, I think this might interest some of you.

https://github.com/schischi-a/xcwd

Offline

#2 2013-05-04 21:06:24

chneukirchen
Member
Registered: 2010-02-11
Posts: 100

Re: xcwd, launch a terminal with the same path

For your tmux.conf:

bind . neww -c ''

EDIT: Ah nvm, I thought you wanted that for tmux too. But it's default there now.

Last edited by chneukirchen (2013-05-04 21:07:06)

Offline

#3 2013-05-05 02:57:15

bladdo
Member
From: Blacksburg, VA
Registered: 2008-05-05
Posts: 111
Website

Re: xcwd, launch a terminal with the same path

Nice! Very minimal. Perfect for scripting.

Any chance  you'll make a PKGBUILD / submit to AUR?


bladdo / mil / Miles
userbound.com - blog and projects

Offline

#4 2013-05-08 20:28:46

bladdo
Member
From: Blacksburg, VA
Registered: 2008-05-05
Posts: 111
Website

Re: xcwd, launch a terminal with the same path

With -Werror, make fails with the most current version on git.

http://ix.io/5xY


bladdo / mil / Miles
userbound.com - blog and projects

Offline

#5 2013-05-17 18:17:29

schischi
Member
From: Paris, France
Registered: 2013-05-01
Posts: 2

Re: xcwd, launch a terminal with the same path

bladdo wrote:

Any chance  you'll make a PKGBUILD / submit to AUR?

I will do it soon.

bladdo wrote:

With -Werror, make fails with the most current version on git.

http://ix.io/5xY

This issue is now fixed.

Offline

Board footer

Powered by FluxBB