Stunkymonkey / nautilus-open-any-terminal

GNU General Public License v3.0
513 stars 51 forks source link

Enable local shell in remote directories #145

Closed human9 closed 4 months ago

human9 commented 4 months ago

Thanks for this nice extension!

When browsing a remote location in nautilus, the native open terminal context menu option gives you the option to open a local or remote terminal:

screeny

I find this pretty useful so this pull request attempts to replicate this behavior within nautilus-open-any-terminal.

If this feature is something that you would consider merging I am happy to make any required changes. I think it could be cleaned up a bit at least.

lvxnull commented 4 months ago

I wouldn't mind adding this feature, but I'd rather have the local option be "open in local terminal" rather than "open in terminal" if the remote option is present as well. This would require updating the translation files.

human9 commented 4 months ago

I agree that would be preferable. I can update the code, unfortunately I am unable to translate the human languages, unless you're happy with a machine translation.

lvxnull commented 4 months ago

I meant that in a "this project must have the translations updated" sense, rather than "you must update the translations". I can update the Polish translation immediately after this is merged, @Stunkymonkey could update the German one, but im not sure how long it would take to get 100% translation coverage again.

human9 commented 4 months ago

I understand, in that case I'll just update the pull request to make the code changes.

human9 commented 4 months ago

Here's how right click on a remote dir now looks:

file

And for clicking in the background of a remote dir:

back

human9 commented 4 months ago

One thing I'm not sure about here is the shortcut key, I just set it to always open a local terminal but that might not be what people want.

lvxnull commented 4 months ago

maybe we could have a setting that determines if the keybind opens a remote terminal when possible

human9 commented 4 months ago

I see, I've replicated with hardcoded strings this time.

human9 commented 4 months ago

And a commit adding a setting that can toggle the shortcut to be local or remote. Let me know if that looks okay.

lvxnull commented 4 months ago

Looks ok at a first glance, I'll check more thoroughly tommorow.

human9 commented 4 months ago

Sorry for delayed response. re: length, I'm open to suggestions. One thing that would definitely reduce required code would be to accept a single naming strategy for both file and background items.

i.e., currently this is the naming for files:

Open In Remote {}
Open In Local {}
Open In {}

and for background:

Open Remote {} Here
Open Local {} Here
Open {} Here

I think the file naming scheme would work for both file and background. But maybe that could be a separate pull request.

lvxnull commented 4 months ago

I have an idea on how to shorten the logic of these methods, but let's focus on merging this PR first.

Stunkymonkey commented 4 months ago

can you please fix the conflicts?

i will think about shortening tomorrow.