Configure XDG mimeapps

This commit is contained in:
Paul-Henri Froidmont 2024-02-24 10:56:34 +01:00
parent bcae4ff2c9
commit c4b7b014a5
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
2 changed files with 35 additions and 0 deletions

View file

@ -111,6 +111,36 @@ in {
}; };
}; };
xdg.mimeApps = {
enable = true;
defaultApplications = {
"inode/directory" = "ranger.desktop";
"text/html" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
"x-scheme-handler/about" = "firefox.desktop";
"image/*" = "feh.desktop";
"audio/*" = "mpv.desktop";
"video/*" = "mpv.desktop";
"application/zip" = "ark.desktop";
"application/rar" = "ark.desktop";
"application/7z" = "ark.desktop";
"application/*tar" = "ark.desktop";
"application/pdf" = "zathura.desktop";
"application/msword" = "onlyoffice-desktopeditors.desktop";
"application/vnd.openxmlformats-officedocument.presentationml.presentation" =
"onlyoffice-desktopeditors.desktop";
"application/vnd.openxmlformats-officedocument*" =
"onlyoffice-desktopeditors.desktop";
"text/*" = "nvim.desktop";
};
};
home = { home = {
keyboard = { keyboard = {
@ -157,6 +187,7 @@ in {
tldr tldr
thefuck thefuck
atool atool
ark
linuxPackages.perf linuxPackages.perf
]; ];
}; };

View file

@ -231,3 +231,7 @@ label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@" label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
ext blend, has blender, X, flag f = blender -- "$@" ext blend, has blender, X, flag f = blender -- "$@"
else = xdg-open "$1"
label editor = "$EDITOR" -- "$@"
label pager = "$PAGER" -- "$@"