Skip to content

zyhazz/default_browser

Repository files navigation

Default Browser Windows

A Windows system tray application that intelligently controls your default web browser, inspired by DefaultBrowser for macOS.

Features

  • Smart Browser Selection: Set as your default browser and choose which browser to actually open links with
  • System Tray Integration: Quick browser switching from the system tray
  • Automatic Browser Detection: Automatically detects installed browsers
  • Persistent Settings: Remembers your preferred browser across sessions
  • Windows Integration: Properly registers as a browser in Windows settings
  • Startup Support: Option to start with Windows
  • Notifications: Optional notifications when switching browsers

Installation

Prerequisites

  • Windows 7 or later
  • .NET 8.0 Runtime

Building from Source

  1. Clone this repository
  2. Make sure you have .NET 8.0 SDK installed
  3. Build the project:
    dotnet build --configuration Release
    
  4. Run the executable from bin/Release/net8.0-windows/

Setting as Default Browser

  1. Run the application
  2. Right-click the system tray icon
  3. Click "Register as Default Browser" (requires administrator privileges)
  4. Go to Windows Settings > Apps > Default apps
  5. Select "Default Browser Windows" as your default web browser

Usage

Basic Usage

  1. Start the application - it will appear in your system tray
  2. Right-click the tray icon to see available browsers
  3. Select your preferred browser from the menu
  4. All links will now open with your selected browser

Settings

  • Start with Windows: Automatically start when Windows boots
  • Show Notifications: Display notifications when switching browsers
  • Use Most Recent Browser: Always use the last selected browser

How It Works

The application registers itself as a web browser in Windows, intercepting URL requests. When a link is clicked:

  1. The application receives the URL
  2. It launches the URL with your currently selected browser
  3. Your selected browser opens the link

This allows you to:

  • Keep your "default browser" setting stable in Windows
  • Quickly switch between browsers without changing Windows settings
  • Use different browsers for different purposes

Supported Browsers

The application automatically detects:

  • Google Chrome
  • Mozilla Firefox
  • Microsoft Edge
  • Opera
  • Brave Browser
  • Vivaldi
  • Any other browser registered in Windows

Command Line Usage

# Register as default browser (requires admin)
DefaultBrowserWindows.exe --register

# Open a URL with selected browser
DefaultBrowserWindows.exe "https://example.com"

# Open an HTML file with selected browser
DefaultBrowserWindows.exe "file.html"

System Requirements

  • Windows 7 SP1 or later
  • .NET 8.0 Runtime
  • Administrator privileges (only for initial registration)

Privacy

  • No data is collected or transmitted
  • All settings are stored locally
  • No network connections except for opening URLs in browsers

License

This project is open source. See LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.

Acknowledgments

Inspired by DefaultBrowser for macOS by Cameron Little.

About

DefaultBrowser for Windows

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published