Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose Terminal Applications #361

Merged
merged 3 commits into from
Dec 31, 2019
Merged

Choose Terminal Applications #361

merged 3 commits into from
Dec 31, 2019

Conversation

FelixZacher
Copy link
Contributor

Description

  • Creates a terminals.json in the "local"-AppFolder with terminal profiles (file). As default profile the "cmd"-profile is included. A second commented profile for powershell is also included. It seems the new Windows Terminal currently does not support launching in a specific directory from commandline (link).
  • Includes a combobox in the settings to choose between the profiles.

UI

Light Dark
files_terminal_settings_white files_terminal_settings_dark

Question

  1. JSON.Net as dependency?
  2. terminal.json-schema? At the moment you can specify a name, a description, the executable path, arguments and an icon, but only the name, the path and the arguments are used.

@yaira2 yaira2 requested a review from lukeblevins December 31, 2019 14:52
@yaira2 yaira2 modified the milestones: v0.8, v0.7.1 Dec 31, 2019
@yaira2 yaira2 changed the base branch from v0.7-changes to v07.1-changes December 31, 2019 14:54
Copy link
Contributor

@lukeblevins lukeblevins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. This should provide a better foundation for users to configure which terminals are used.

@lukeblevins lukeblevins merged commit 13667d8 into files-community:v07.1-changes Dec 31, 2019
@SOI7
Copy link

SOI7 commented Jan 29, 2020

@lampenlampen Judging from this post (https://github.com/microsoft/terminal/issues/620) it seems that now it's possible to launch Windows Terminal from a directory. The command line in the address bar is wt.exe and to enable the starting directory you need to add "startingDirectory": "." in the default profile used in Terminal. I tried this in the Win32 Explorer and works like a charme, and adding this to the terminal.json should be straghtforward (I tried this on 0.7.1 as well, the command works for opening Terminal but none of the consoles actually launches in the folder I run the command from, not even cmd)

EDIT: An upcoming update will also enable this through wt -d according to this post: https://github.com/microsoft/terminal/issues/878

@FelixZacher
Copy link
Contributor Author

FelixZacher commented Jan 30, 2020 via email

@yaira2
Copy link
Member

yaira2 commented Jan 30, 2020

@lampenlampen We ported over the work in settings-vm to v0.7.1-changes.

@FelixZacher
Copy link
Contributor Author

FelixZacher commented Jan 30, 2020

@SOI7 I missunderstand you. I thought you talked about opening files in a specific directory.

I checked and I am able to open cmd in the specified directory.

I would suggest opening a bug report and I will need more information to investigate.

PS: I only checked with the default cmd profile.

@SOI7
Copy link

SOI7 commented Jan 30, 2020

@SOI7 I missunderstand you. I thought you talked about opening files in a specific directory.

I checked and I am able to open cmd in the specified directory.

No, I was talking about opening the preferred terminal app (specified in Files settings) from a folder in Files. I simply bumped you because in the OP you stated "It seems the new Windows Terminal currently does not support launching in a specific directory from commandline", and now things have changed

@FelixZacher
Copy link
Contributor Author

FelixZacher commented Jan 30, 2020

So i played with Windows Terminal a bit.

  1. You cannot pass a path to open in Windows Terminal. So for me it seems, that Windows Terminal simply opens the workingDirectory of the process it was launched from. Therefore it works from terminals and the explorer, but i think it will not work with files, because it does not change it's workingDirectory to the folder currently displayed.

    Therefore we have to wait until Windows Terminal support passing a path to it.

  2. On my machine I'm able to open a directory in cmd and powershell. So for this issue i suggest opening a bug report here and include your profiles.json.

PS1:
I actually tried opening Windows Terminal from files and it opens in System32. So we will have to wait for Windows Terminal to support a path argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants