browserchooser

command module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 31 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
F2 toggle dark/light theme

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).

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

Theme

Nord palette, dark by default. Toggle with F2; the choice persists.

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