Smart Browser Router for Hyprland

What is hyprchoosy?

hyprchoosy routes URLs to different browsers based on the originating application or URL hostname. It's a smart browser selector for Hyprland that gives you fine-grained control over which browser opens which links.

After switching to Omarchy, I needed a Choosy replacement. So I built it.

Features

Client-based routing

Open links from Slack in Chrome, Discord in Firefox, etc.

URL-based routing

Route specific domains to specific browsers

Smart detection

Automatically detects originating application

Priority system

Client rules take precedence over URL rules

XDG compliant

Respects standard config locations

Lightweight

Fast Rust binary with minimal dependencies

Installation

Download the latest release from GitHub Releases.

x86_64 (Intel/AMD) - Standard

wget https://github.com/filipechagas/hyprchoosy/releases/latest/download/hyprchoosy-amd64.tar.gz
tar xzf hyprchoosy-amd64.tar.gz
sudo mv hyprchoosy /usr/local/bin/

x86_64 (Intel/AMD) - Static Binary

wget https://github.com/filipechagas/hyprchoosy/releases/latest/download/hyprchoosy-amd64-musl.tar.gz
tar xzf hyprchoosy-amd64-musl.tar.gz
sudo mv hyprchoosy /usr/local/bin/

ARM64 - Standard

wget https://github.com/filipechagas/hyprchoosy/releases/latest/download/hyprchoosy-arm64.tar.gz
tar xzf hyprchoosy-arm64.tar.gz
sudo mv hyprchoosy /usr/local/bin/

ARM64 - Static Binary

wget https://github.com/filipechagas/hyprchoosy/releases/latest/download/hyprchoosy-arm64-musl.tar.gz
tar xzf hyprchoosy-arm64-musl.tar.gz
sudo mv hyprchoosy /usr/local/bin/

From Source

git clone https://github.com/filipechagas/hyprchoosy
cd hyprchoosy
cargo install --path .

Configuration

Create ~/.config/hyprchoosy/config.toml:

[default]
browser = "firefox"

# Route links from Slack to Chrome
[work]
browser = "google-chrome-stable"
clients = ["slack"]

# Route GitHub to Firefox
[dev]
browser = "firefox"
url = ["github.com", "gitlab.com"]

# Route social media to Brave
[social]
browser = "brave"
url = ["twitter.com", "reddit.com", "youtube.com"]

Setup

1. Create Desktop Entry

Create ~/.local/share/applications/hyprchoosy.desktop:

[Desktop Entry]
Version=1.0
Name=Hyprchoosy
Comment=Smart browser router for Hyprland
Exec=/usr/local/bin/hyprchoosy %u
Terminal=false
Type=Application
MimeType=x-scheme-handler/http;x-scheme-handler/https;text/html;
Categories=Network;
NoDisplay=true

Then update the desktop database:

update-desktop-database ~/.local/share/applications/

2. Set as Default Browser

Try setting hyprchoosy as your default URL handler:

xdg-settings set default-web-browser hyprchoosy.desktop

If xdg-settings doesn't work (which is common), manually edit ~/.config/mimeapps.list and replace:

text/html=chromium.desktop
x-scheme-handler/http=chromium.desktop
x-scheme-handler/https=chromium.desktop

With:

text/html=hyprchoosy.desktop
x-scheme-handler/http=hyprchoosy.desktop
x-scheme-handler/https=hyprchoosy.desktop

Or use these commands:

sed -i 's/text\/html=.*\.desktop/text\/html=hyprchoosy.desktop/' ~/.config/mimeapps.list
sed -i 's/x-scheme-handler\/http=.*\.desktop/x-scheme-handler\/http=hyprchoosy.desktop/' ~/.config/mimeapps.list
sed -i 's/x-scheme-handler\/https=.*\.desktop/x-scheme-handler\/https=hyprchoosy.desktop/' ~/.config/mimeapps.list

How It Works

  1. Process detection — Walks up the process tree to find the originating application
  2. Client matching — Checks if the client matches any configured rules
  3. URL matching — If no client match, checks the URL hostname
  4. Default fallback — Uses default browser if no rules match
  5. Launch — Spawns the selected browser detached from the current process

Matching Rules

  • Client matching: Partial match, case-insensitive (e.g., clients = ["slack"] matches "slack-desktop")
  • URL matching: Exact domain or subdomain (e.g., url = ["github.com"] matches "github.com" and "*.github.com")
  • Priority: Client rules → URL rules → Default browser