microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
109.69k stars 6.46k forks source link

Browser Picker #1642

Open Psychlist1972 opened 4 years ago

Psychlist1972 commented 4 years ago

Browser picker so you can have rule-based default browsers

This is something I've wanted to write, but just haven't had time to do so. I originally considered this a store app, but I think PowerToys is a much better fit because this is more of a power user thing.

Many of us use multiple browsers so we can keep cookies separate. Most apps, however, want to launch just the default browser. In apps that support it, right now, I have to right-click and copy the URL and then paste it into the browser I want to use. That's clumsy.

Instead, it would be great to be able to set up rules for which browser to open. For example:

The browser would be an actual browser on the system, and also options like inprivate/incognito as appropriate.

Proposed technical implementation details

The Browser Picker would be registered as the default browser. It would apply the rules and, if there's a match, open the browser selected. No UI needed in this case.

There would also need to be either a config UI, and/or a well-understood JSON file with the rules.

If no match, the default could be to use a specific browser, or to prompt.

Jay-o-Way commented 4 years ago

You pretty much described - in detail - a wish I have had for quite a long time now.

Probably redundant, but in my words: I use an MS/outlook account for my "business" things (like work, financial stuff et cetera) and a Google/Android account for personal stuff. I also want to use the apps from each company - as much as possible - for the corresponding things. I would like to be able to control the browser for (links to) certain domains/websites. So, having MS Edge as the default browser on my PC, it would be nice if links to a personal list of domains will automatically open in Google Chrome. Or Firefox.

Jay-o-Way commented 4 years ago

Not a solution, but if there are certain website you often use and would rather open in a non-standard browser, you can turn some of them into a browser-app. That way you can open it from Start menu - or anywhere else.

Jay-o-Way commented 3 years ago

@gmyx Are you still interested in contributing with the solution you made?

gmyx commented 3 years ago

Yes, but it will take a long time to do anything. The current tool is written in VB.Net. A lot of work is needed to convert.

Edit: I am still getting the dev environment set-up.

patware commented 3 years ago

Not just the Web Browser, email also (and probably others)...

As an end user, it's great to have a UI/functionality that gives us the ability to select a default app for things like emails, web browsers, videos, music, etc., but there scenarios where there's multiple apps:

daltskin commented 3 years ago

Check out this solution: https://github.com/mortenn/BrowserPicker by Morten Nilsen

Would make a great additional to PowerToys 😀

Psychlist1972 commented 3 years ago

@daltskin Morten's project is a good start, for sure. Thanks for bringing it up here :)

Jay-o-Way commented 3 years ago
  • Since the pandemic, more and more people are working from home and their PC is used for personal and for work. Clicking on a "send email" button from an app would be work vs personal related.

People should keep work and private things apart as much as possible. Separate Windows accounts would be ideal.

Jay-o-Way commented 2 years ago

@gmyx How's your project coming along, if you don't mind me asking? :)

U-C-S commented 2 years ago

@crutkas , @Jay-o-Way , cc @gmyx

I would love to work on this power toy, if currently none are working on this.

I already have done a similar project - Hurl. Supports a few of the features from mentioned projects.

thellMa commented 1 year ago

@crutkas , @Jay-o-Way , cc @gmyx

I would love to work on this power toy, if currently none are working on this.

I already have done a similar project - Hurl. Supports a few of the features from mentioned projects.

@U-C-S I have seen your Hurl project, nice one and I have some additional request, for example ability to pick different Chrome profiles automatic instead of having them in a setup file. Anyway it would be nice to have everything inside this Powertoys app instead. So I would love to help out on this :-)

U-C-S commented 1 year ago

for example ability to pick different Chrome profiles automatic instead of having them in a setup file

Yeh, Im currently working on that for Hurl

About this powertoy, Im still open to work on it, I was previously waiting for maintainer's reply (and my laptop upgrade, which is done recently). For now, I'll experiment with this repo and see if integration with Hurl is directly feasible with minimal code modifications (im very new to this and wpf stuff)

Aaron-Junker commented 1 year ago

Hi @U-C-S I'm sorry we have missed your offer for collaboration. I will add @jaimecbernardo and @crutkas

aloneguid commented 1 year ago

It's actually harder than you think, especially if you want to detect browser profiles of different browsers, and not just the browsers themselves. Add massive implementation differences between Chrome-based ones, Firefox etc. Try https://www.aloneguid.uk/projects/bt/

ShowMeBillyJo commented 1 year ago

I found these similar (closed-source) utilities today, maybe they'll be helpful for the folks implementing this feature.

Jay-o-Way commented 1 year ago

@crutkas @jaimecbernardo have you contacted @U-C-S ? If not, please do.

jaimecbernardo commented 1 year ago

Looking at Hurl from @U-C-S . Thanks for the collaboration proposal. Looks like it's basically setting itself up as the default browser in the machine. I suppose this could be a PowerToys where when enabling, it would set itself as a selectable browser (possibly would require user interaction too). @crutkas , is this something that would make sense in PowerToys?

liias commented 1 year ago

Hi. If you are interested in parsing profiles of chromium based browsers and profiles and containers of firefox based browsers you can check out some source from my repository https://github.com/Browsers-software/browsers

It doesn't have Windows support right now but that part should be same between platforms.

If you are really interested, I'd consider making rust crates just for parsing this info out of popular browsers, so everybody benefits. Not sure if you want to integrate with rust though.

Cheers, Madis

eidylon commented 1 year ago

I would LOVE this! I do work for my primary company, and also for our sister-company. Each company has it's own TFS/AzureDevOps account. But whenever I click a notification link in a TFS email, it always wants to go to the default browser (of course).

However I use different browsers for each company, like stated above, for keeping cookies/logins separate, so I don't need to keeping logging out of one and then into the other.

It would be amazing to be able to set up system-level rules like

aloneguid commented 1 year ago

@eidylon BT already does this. And it's operating at 6mb ram and 0% CPU. https://www.aloneguid.uk/projects/bt/

eidylon commented 1 year ago

@U-C-S

I would love to work on this power toy, if currently none are working on this.

I already have done a similar project - Hurl. Supports a few of the features from mentioned projects.

Hurl looks beautiful! And with the addition of the auto-launch rules you're currently working on, it sounds like it would already be the perfect drop-in for this tool-request. Just bring it inline with whatever PT common code is needed, and BAM - Done! 😎

vvirtues commented 9 months ago

+1

nvmkpk commented 9 months ago

This applies to files too. If I have multiple image editors/viewers installed I would like to be able to configure rules based on the image file path. I use 'Always Ask` app that I wrote myself. It currently does not have rules and only works with web links. I plan to extend it to all files when I have time.

hrvojegolcic commented 1 month ago

+1