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 and configurable terminal execution arguments.
  • 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 Explore our carefully curated directory of recommended free and open source software, covering every major software category.

The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more.

Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted