raphaelfournier
raphaelfournier

Reputation: 97

urxvt: Open graphical file explorer in the current folder

While the command line is very useful for most of the tasks, I sometimes resort to a graphical file explorer (like Nautilus, Thunar, PCmanFM). I would like a keyboard shortcut or a context-menu entry to open such a graphical file explorer _in the current directory. I know the converse is possible with nautilus-open-terminal. Is there currently a way to do that?

It may require writing a perl-extension, but I do not know enough of perl and urxvt to find how to capture the current PWD.

Upvotes: 0

Views: 333

Answers (2)

raphaelfournier
raphaelfournier

Reputation: 97

Well, I quickly hacked a small extension to do this: https://github.com/raphaelfournier/urxvt-perl.

The opening of the file browser can be triggered with the right-click menu or a keyboard shortcut. The selection can be a directory, but also a filename, which will then be opened by the application associated with it in the file browser.

Upvotes: 0

Grant McLean
Grant McLean

Reputation: 7008

Assuming you're using Bash as your shell, here's an alias you could add to your .bashrc:

alias nh="nautilus file://$(pwd)"

I called it nh for "Nautilus here". So from the comman-line you would simply type:

nh

for a nautilus window in the shell's current directory.

I have no idea what's involved in adding something to the urxvt context menu - sorry.

Upvotes: 1

Related Questions