Smart browser router for Hyprland
Route URLs to different browsers based on the originating application or URL hostname.
- Client-based routing - Open links from Slack in Chrome, Discord in Firefox, etc.
- URL-based routing - Route specific domains to specific browsers
- Priority system - Client rules take precedence over URL rules
- Automatic client detection - Walks up the process tree to find the originating application
- XDG compliant - Respects
$XDG_CONFIG_HOMEfor configuration - Lightweight - Fast binary with minimal dependencies
- Hyprland native - Built specifically for Hyprland desktop environment
Download the latest release for your architecture from GitHub Releases.
Note: DEB, RPM, and Arch packages are also available on the releases page.
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 (musl):
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 (musl):
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/git clone https://github.com/filipechagas/hyprchoosy
cd hyprchoosy
cargo install --path .Create ~/.config/hyprchoosy/config.toml:
[default]
browser = "firefox"
# Route links from Slack to Chrome
[work]
browser = "google-chrome-stable"
clients = ["slack"]
# Route GitHub and work domains to Firefox
[personal]
browser = "firefox"
url = ["github.com", "gitlab.com"]
# Route social media to a separate browser profile
[social]
browser = "brave"
url = ["twitter.com", "reddit.com", "youtube.com"]
# Route work tools from specific clients
[dev]
browser = "chromium"
clients = ["discord", "telegram"]
url = ["localhost", "127.0.0.1"]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=trueThen update the desktop database:
update-desktop-database ~/.local/share/applications/Try setting hyprchoosy as your default URL handler:
xdg-settings set default-web-browser hyprchoosy.desktopIf xdg-settings doesn't work (which is common), manually edit ~/.config/mimeapps.list:
Find and replace these lines:
text/html=chromium.desktop
x-scheme-handler/http=chromium.desktop
x-scheme-handler/https=chromium.desktopWith:
text/html=hyprchoosy.desktop
x-scheme-handler/http=hyprchoosy.desktop
x-scheme-handler/https=hyprchoosy.desktopOr 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.listhyprchoosy https://github.comEnvironment variables:
HYPRCHOOSY_CONFIG- Override config file location
HYPRCHOOSY_CONFIG=~/my-config.toml hyprchoosy https://example.com[default] section:
browser- Default browser command (default:"firefox")
Named rule sections:
browser- Browser command to use for this ruleclients- List of client application names (partial match, case-insensitive)url- List of hostnames/domains to match
Matching rules:
-
Client matching - Checks if any client name contains the substring
clients = ["slack"]matchesslack,slack-desktop, etc.
-
URL matching - Checks hostname equality or subdomain
url = ["github.com"]matchesgithub.comand*.github.com
-
Priority - Client rules > URL rules > Default
- Process detection - Walks up the process tree to find the originating application
- Client matching - Checks if the client matches any configured rules
- URL matching - If no client match, checks the URL hostname
- Default fallback - Uses default browser if no rules match
- Launch - Spawns the selected browser detached from the current process
Skipped processes (when detecting client):
xdg-open,gio- Shell processes (
bash,zsh,fish, etc.) - System processes (
systemd,dbus-daemon) - Desktop portals (
xdg-desktop-portal*)
Normal build (no logging):
cargo build --releaseDebug build (with logging):
cargo build --release --features debug
# Or use the convenience script
./build-debug.shSee DEBUG.md for details on using debug logging to troubleshoot routing issues.
cargo test./scripts/build-release.shThis creates release artifacts for multiple architectures in the release/ directory.
Contributions are welcome! Please follow Conventional Commits for commit messages.
Commit examples:
feat: add new feature- New feature (bumps minor version)fix: bug fix- Bug fix (bumps patch version)docs: update README- Documentation changesfeat!: breaking change- Breaking change (bumps major version)
- Commit changes using conventional commits
- Push to
masterbranch - Release Please creates a release PR automatically
- Merge the PR to create a new release
- GitHub Actions builds and publishes artifacts
MIT License - see LICENSE file for details.
Made with β€οΈ for Hyprland users