Selection of utilities

handlr-regex – manage default applications with regular expressions

handlr-regex is a command-line utility for managing default applications and opening files or URLs through XDG MIME associations. It is a fork of handlr that adds regular-expression-based handlers while retaining a compact command-oriented workflow.

The program accepts either MIME types or familiar filename extensions, so users do not always need to look up the corresponding MIME identifier. It can also serve as an xdg-open replacement for users who prefer its handler selection and scripting facilities. Configuration is kept in the user’s XDG configuration directory and integrates with the standard mimeapps.list mechanism.

This approach makes handlr-regex particularly suited to keyboard-centric desktops, shell scripts and lightweight environments where a full graphical settings panel is unnecessary.

This is free and open source software.

Key Features

  • Sets default handlers using either filename extensions or MIME types.
  • Associates arbitrary commands with regular-expression patterns.
  • Detects MIME types from both filename extensions and file contents.
  • Opens multiple files or URLs in a single invocation.
  • Supports multiple handlers for one type and optional selection through tools such as rofi or dmenu.
  • Handles wildcard MIME patterns such as text/*.
  • Can expand wildcard associations into matching concrete MIME types when configured.
  • Removes invalid desktop entries from mimeapps.list.
  • Provides get, list, launch and mime commands for shell workflows.
  • Offers JSON output for selected commands and tab-separated output when table data is piped.
  • Supports Terminal=true desktop entries, using the x-scheme-handler/terminal preference when configured.
  • Generates shell completion data for supported shells.
  • Includes configurable logging to stderr, notifications and a log file.
  • Provides verbose and quiet controls for troubleshooting output.

Website: github.com/Anomalocaridid/handlr-regex
Support:
Developer: Duncan Russell and Gregory Petrosyan
License: MIT License

handlr-regex is written in Rust. Learn Rust with our recommended free books and free tutorials.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted