This repository is dedicated place for BrowserPicker, a browser launcher for Windows.
BrowserPicker is a lightweight application that acts as an intermediary between URLs and preferred browsers. It allows to easily choose which browser to open a link with, eliminating the limitations of a single default browser.
- Highly configurable: Customize browser setups, hotkeys, default/alternative argument sets, and more in a simple JSON file.
- Lightweight: Designed for quick startup and minimal resource usage.
- Portable: No installation required, can be run directly from any directory.
- Overhead absence: Does not require autostart nor stays as the background process after startup.
A few years ago, only few browser launchers were worth mentioning:
- Browser Chooser 2
- Browser Selector
- BrowserTraySwitch
- Browser Routr
- BrowserSelect
However, they suffer from many limitations:
- Oudated: Relic of the past Windows XP era.
- Cumbersome: Unnecessarily complicated with configuration via the user interface, including the use of wildcards.
- Limited browsers: Only support installed browsers.
- Slow experience: Lack of hotkeys for immediate browser confirmation.
- Inflexible: Use absolute paths with no option to export settings.
- Background processes: Remain running in the background.
Initially, the idea was to stick with C# and WinForms to avoid delving into low-level languages or manual window drawing, while also aiming for the best possible startup time. This idea was reinforced by the fact that in the early .NET 5 era, there was an experimental lab project, NativeAOT-LLVM. Unfortunately, basic tests immediately revealed that Ahead-of-time (AOT) compilation is not going to help with the bottleneck, which is WinForms.
Nowadays, .NET has its own built-in NativeAOT and Self-containing publishing. Contrary to NativeAOT-LLVM, which cannot be used with newer .NET version, NativeAOT does not support WinForms at all due to Trimmed Deployments. Please refer to the issue #4649 for more information.
However, even without Native AOT, thanks to ReadyToRun Compilation and other enhancements in the CLR and .NET ecosystem, BrowserPicker startup time is quick enough.
It is also worth mentioning Browser Tray as a more powerful alternative.
- Windows 7 and newer
- .NET Desktop Runtime 8.0
- This can be omitted if published as a self-contained application, please refer to the Deploying for details.
Optionally, use any of the methods below to change the default browser:
- Change your default browser in Windows
ms-settings:defaultappsthrough the Run menu (Win + R)- SetDefaultBrowser
- FileTypesMan
- Set up the configuration file as stated in the Configuration.
- Either:
- Pass a URL as an argument (
BrowserPicker.exe https://example.com). - Set it as your default browser and click on a link.
- Pass a URL as an argument (
- Press
Escto cancel opening the link. - Optionally, hold
ShiftorAltto switch to alternative browser configurations. - Choose your desired browser from the popup window with mouse or assigned hotkeys.
The configuration file must be named config.json and exist in the current working directory from which
BrowserPicker is run.
It must be an array of Browser Objects, where each field documented here is mandatory. In addition to the JSON Specificaiton, a trailling comma is supported.
Please refer to the share/examples for a complete example. Included icons are released under Apache or Creative Commons licensing by Vectopus FZ-LLC and Pixel Bazaar and can be found at https://www.iconfinder.com and https://icon-icons.com.
| Field | Description |
|---|---|
name |
Name of the browser setup. |
bin |
[*] Path to the binary. |
args |
An array of set of arguments. |
args.def |
[*] A set of default arguments that be will prepended to the URL. |
args.alt |
[*] A set of alternative arguments that be will prepended to the URL. |
icon |
A path to the icon. |
keys |
An array of hotkeys. |
* - Supports Environmental Variables.
Example:
{
"name": "Alex's Chromium",
"bin": "%LOCALAPPDATA%\\Chromium\\Application\\chrome.exe",
"args": {
"def": [],
"alt": [ "--incognito" ]
},
"icon": "icon.png",
"keys": [ "x" ]
}BrowserPicker is a standard .NET project. Please refer to the official Deploying documentation for a comprehensive guidance.
The target framework version can be changed to any version that supports C# 10, which includes .NET 6 and higher. Visit the Framework targeting overview for detailed explanations.
Building a Single-file deployment is not recommended due to the large size of the resulting binary, mainly because it cannot utilize use [https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options](Trimmed Deployments).
Examples:
To build a framework-dependent executable for a specific platform:
dotnet publish -r win-x64 -c ReleaseTo build a self-contained executable:
dotnet publish -r win-x64 -c Release --self-containedThis project is licensed under the MIT License. You are free to use, modify, and distribute this software, but please provide attribution.
