Linux command
handlr 命令
网络
复制后可按需替换文件名、目录或参数。
常用示例
Open
handlr open https://example.com
Example
handlr open [path/to/file.pdf]
Set
handlr set .png imv.desktop
Example
handlr set 'audio/*' mpv.desktop
List
handlr list
Get
handlr get .png
说明
handlr is a modern alternative to xdg-utils for managing default applications on Linux. It handles file and URL associations through MIME types and file extensions. The tool modifies ~/.config/mimeapps.list (and optionally the deprecated ~/.local/share/applications/mimeapps.list) to set default applications. It supports both specific file extensions (.pdf, .png) and MIME type patterns (audio/*, video/*). handlr aims to be simpler and more predictable than xdg-open and xdg-mime, with better terminal integration and clear output.
参数
- open _PATH|URL_
- Open file or URL with default application
- set _MIME|EXT_ _HANDLER_
- Set default application for MIME type or extension
- get _MIME|EXT_
- Get default application for MIME type or extension
- list
- List all configured default applications
- unset _MIME|EXT_
- Remove default application setting
- add _MIME|EXT_ _HANDLER_
- Add handler to list without setting as default
FAQ
What is the handlr command used for?
handlr is a modern alternative to xdg-utils for managing default applications on Linux. It handles file and URL associations through MIME types and file extensions. The tool modifies ~/.config/mimeapps.list (and optionally the deprecated ~/.local/share/applications/mimeapps.list) to set default applications. It supports both specific file extensions (.pdf, .png) and MIME type patterns (audio/*, video/*). handlr aims to be simpler and more predictable than xdg-open and xdg-mime, with better terminal integration and clear output.
How do I run a basic handlr example?
Run `handlr open https://example.com` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does open _PATH|URL_ do in handlr?
Open file or URL with default application