-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
feature: allow configuring default browser #219885
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice approach 👏
src/vs/workbench/contrib/externalUriOpener/common/configuration.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/externalUriOpener/common/configuration.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/externalUriOpener/common/configuration.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/externalUriOpener/common/configuration.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/externalUriOpener/common/configuration.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/externalUriOpener/common/configuration.ts
Outdated
Show resolved
Hide resolved
Thanks for the feedback! Changed the setting name to Also more variants are support now, for example:
In case of error, it now falls back to |
@SimonSiefke thanks, did some follow up cleanup, please check. I renamed the setting to Its sad we cannot use the latest I wonder if people in the future want more options, such as controlling arguments to the browser. In that case maybe the setting should already make room for other settings? Like |
Pushed some more changes to validate invalid inputs and missing paths, I think this is good to go as it is. |
I see you decided on application scope for the setting, #96132 (comment) gave a use case for workspace-specific settings. I think you considered allowing this for workspaces but only respecting it if the workspace has been trusted by the user. What was the reason for not doing that? |
If we want to make this a workspace setting, the change will become larger: in I am fine making this a workspace supported setting if its untrusted. |
I like that idea! The workspace setting also sounds good to me! It seems it might be a larger change, so maybe it could be a separate pull request. |
Ideally we do all the changes in one PR when we think its done. Maybe @gjsjohnmurray wants to join forces? |
Alright then, I can try to make the workspace setting changes. :) Is there any standard way of handling multiple workspaces? E.g. when two workspaces are open ( |
The workspace settings are bound to the window you are in where you click from, so we do typically not support workspace settings in another folder, even if you are in that context. I would suggest to read the setting here where we open links from a window:
and send it over + provide a fallback for the other usages where we are not in a workspace context. in these cases I think its fine to do the config reading as we do today only supporting app scope. |
I had some slack time and went ahead implementing what we discussed. |
Waiting for #220273 for the dependencies. |
Awesome, thanks! :) |
Helps with #96132.
This adds a new setting
workbench.defaultBrowser
for configuring which browser to open:default-browser.mp4
The value for
workbench.defaultBrowser
is a string and can either be an application name likegoogle-chrome
or an absolute path like/usr/bin/google-chrome
.