browserchooser

command module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 32 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Browser Chooser

A small rofi-style browser selector for Linux, macOS, and Windows. Point it at a URL and pick which browser opens it, or copy the link to the clipboard and share it. Built with Fyne in Go.

What it does

A single fixed-size window with 7 slots:

slot purpose
1 text input (fuzzy filter)
2-6 browser rows (up to 4, plus a pinned copy row)
7 Show QR code toggle

Start typing to fuzzy-filter the list by name; rows are ranked by fuzzy match then usage frequency/recency (frecency). Browsers are detected from .desktop files on Linux, app bundles on macOS, and standard install paths on Windows.

Keys

key action
1-4 open the numbered browser
5 copy the link to the clipboard
Enter open the top match
Ctrl+C copy the link and quit
Esc quit

Usage

browserchooser https://example.com

With no argument it opens as an interactive picker. Flags:

flag action
--set-default register as the default browser (Linux)
--help show usage

--set-default installs the desktop file to ~/.local/share/applications/ and registers it as the default handler for text/html, http, https, and ftp. The binary must be on PATH for it to be invoked with URLs.

Rules

Optionally route URLs to a specific browser with rules.json in the user config dir ($XDG_CONFIG_HOME/browserchooser/rules.json). Each rule is an expr expression over the variable link that must evaluate to a bool, plus the browser id to use:

[
  {"expr": "link contains \"github.com\"", "browser": "firefox"}
]

The first matching rule wins; a match opens its browser without showing the picker. Browser ids come from the executable basename (e.g. firefox, google-chrome).

Settings

Optional config.toml in the user config dir ($XDG_CONFIG_HOME/browserchooser/config.toml).

key effect
theme color scheme: auto (default) follows the system, light and dark force a variant
firefox.profiles list every Firefox profile as its own selection, launched with -profile. On by default; set to false to disable. Covers classic profiles.ini profiles and modern profile-group profiles, whose real names are read from the Profile Groups sqlite DBs (via the sqlite3 CLI; falls back to the directory name when that is unavailable). Works on Linux, macOS, and Windows
chrome.profiles list every Google Chrome profile (from Local State) as its own selection, launched with --profile-directory. On by default; set to false to disable
theme = "dark"

[firefox]
profiles = false

[chrome]
profiles = true

Build

go build ./...

The binary is browserchooser. It needs a display; Fyne handles the backend per platform.

Install (Linux desktop file)

go build -o browserchooser .
install -Dm755 browserchooser ~/.local/bin/browserchooser
install -Dm644 dev.fishman.browserchooser.desktop \
  ~/.local/share/applications/dev.fishman.browserchooser.desktop
update-desktop-database ~/.local/share/applications

Why not an existing browser chooser?

There are established link-picker tools; here is what pushed this one into existence and keeps it small.

tool model misses for us
Browserosaurus / Browseratops default-browser hook that pops a menu Electron (Node + WebKit) runtime; macOS/Windows only, no Linux/Wayland
@browsers-style launcher scripts rofi shell/JS scripts that parse profiles.ini pulled in a pile of deps; miss modern Firefox profile-group profiles, which live in Profile Groups sqlite DBs, not profiles.ini; rofi sits on X11, not Wayland
linkquisition Go browser chooser with routing rules far larger codebase to audit for a one-purpose tool

browserchooser keeps three properties the above split across them:

  • One static binary, no runtime stack. Go + Fyne only; no Electron, Node, WebKit, or script interpreter to ship or keep patched.
  • Modern Firefox profiles work. Real names are read from the Profile Groups sqlite DBs (via the sqlite3 CLI), not profiles.ini, so the profiles that exist after Firefox 137 resolve to their actual names.
  • Cross-platform and Wayland-native. Fyne draws directly on Wayland (and X11), and the same binary runs on Linux, macOS, and Windows. The dedicated pickers above are each locked to one OS.

The codebase stays small enough to read end to end, which matters for a tool that sits at the default-browser boundary.

Theme

Nord palette. The scheme is set in config.toml: theme = "auto" (default) follows the system's dark/light, while theme = "light" or theme = "dark" forces a variant.

License

MIT. All dependencies are permissive (MIT / BSD / Apache-2.0), so the project carries no copyleft obligation.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL