Skip to content

URL Routing and Webapps

The custom URL handler makes http and https links choose between two launch paths:

  • Matching URLs open as standalone Omarchy webapps.
  • Everything else opens in Chromium as a normal browser tab or window.

This keeps common app-like sites in dedicated windows without making every link a webapp.

The handler is part of the stowed Hypr package:

PathPurpose
~/.config/hypr/bin/timmo-url-handlerRuntime URL router.
~/.config/hypr/bin/timmo-setup-url-handlerIdempotent install/remove helper.
~/.config/hypr/url-handler/patterns.confRouting rules.
~/.config/hypr/url-handler/omarchy-url-handler.desktopDesktop entry used by xdg mime handling.

Edit the source files in the dotfiles repo, then run dot stow:

~/.config/dotfiles/hypr/.config/hypr/

Run the setup helper after the Hypr package is stowed and ~/.config/hypr/bin is on PATH:

Terminal window
timmo-setup-url-handler

The setup helper:

  • Creates or updates the desktop file.
  • Symlinks it into ~/.local/share/applications/.
  • Sets it as the default handler for http, https, about, and unknown schemes in ~/.config/mimeapps.list.
  • Backs up mimeapps.list before changing it.
  • Runs update-desktop-database when that command is available.

Rules live in:

~/.config/hypr/url-handler/patterns.conf

Each non-comment line starts with an action and a glob pattern:

webapp:discord.com
webapp:*.youtube.com
browser:*.gitlab.com

Patterns are checked against both the full URL and the extracted domain. The first matching rule wins.

If nothing matches, the default action is browser.

  1. Edit ~/.config/dotfiles/hypr/.config/hypr/url-handler/patterns.conf.
  2. Add a webapp:<pattern> line above any broader browser rule.
  3. Run dot stow.
  4. Test with timmo-url-handler <url>.

Example:

webapp:calendar.google.com
webapp:*.calendar.google.com

Use browser:<pattern> when a site should not become a webapp:

browser:gitlab.com
browser:*.gitlab.com

Browser routes launch Chromium directly through uwsm-app so the default handler does not recurse back into itself.

Run the handler directly:

Terminal window
timmo-url-handler https://github.com
timmo-url-handler https://gitlab.com

To check the desktop default:

Terminal window
xdg-mime query default x-scheme-handler/https

Expected output:

omarchy-url-handler.desktop
Terminal window
timmo-setup-url-handler remove

The remove path deletes the applications symlink and desktop file. If the setup backup exists, it restores ~/.config/mimeapps.list from that backup. If no backup exists, clean up mimeapps.list manually.

If the setup script cannot find timmo-url-handler, check that the Hypr bin directory is on PATH and run dot stow again.

If a URL opens in the browser when it should be a webapp, put the more specific webapp: rule before broader browser: rules and test the exact URL with timmo-url-handler.

If every browser launch loops, check that the browser branch still launches /usr/bin/chromium directly rather than calling xdg-open.