通常,我应该编写一个 FileType.xml 并使用
xdg-mime install FileType.xml
Run Code Online (Sandbox Code Playgroud)
然后使用
xdg-mime default xxx.desktop file-type
Run Code Online (Sandbox Code Playgroud)
设置默认应用程序和
xdg-icon-resource install xxx
Run Code Online (Sandbox Code Playgroud)
设置默认图标。最后,删除FileType.xml。
老实说,我永远记不起 FileType.xml 的格式和“xdg-icon-resource”的参数。当我想安装新的文件类型时,这对我来说是一种折磨。
那么,有 xdg-mime 的 GUI 工具吗?
小智 0
使用Handlr。设置所有这些要容易得多。 https://github.com/chmln/handlr
handlr 打开 ~/.dotfiles/pacman/packages.txt
handlr 打开https://google.ca
手柄设置.png feh.desktop
handlr 设置 'text/*' nvim.desktop
Handlr 设置应用程序/pdf evince.desktop
处理列表
handlr 获取 .png feh.desktop
handlr 启动 x-scheme-handler/https -- https://google.ca
归档时间: |
|
查看次数: |
1842 次 |
最近记录: |