home: mimeapps: overhaul

This commit is contained in:
Guanran Wang 2023-12-02 21:31:34 +08:00
parent 0790c02c48
commit f3899c3d0f
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8

View file

@ -1,28 +1,36 @@
_: { {lib, ...}: {
# Default application associstions, ro. # https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
xdg.mimeApps = { xdg.mimeApps = {
enable = true; enable = true;
defaultApplications = {
"audio/mpeg" = "io.bassi.Amberol.desktop"; # Default application associstions
"audio/flac" = "io.bassi.Amberol.desktop"; defaultApplications =
"image/jpeg" = "org.gnome.Loupe.desktop"; {
"image/png" = "org.gnome.Loupe.desktop"; "inode/directory" = ["org.gnome.Nautilus.desktop"];
"inode/directory" = "org.gnome.Nautilus.desktop"; "tg" = ["org.telegram.desktop.desktop"]; # https://t.me/nixos_zhcn/363204
"text/html" = "librewolf.desktop"; }
"x-scheme-handler/http" = "librewolf.desktop"; ### Browser
"x-scheme-handler/https" = "librewolf.desktop"; // lib.genAttrs [
"x-scheme-handler/about" = "librewolf.desktop"; "text/html"
"x-scheme-handler/unknown" = "librewolf.desktop"; "x-scheme-handler/http"
#"text/html" = "io.gitlab.librewolf-community.desktop"; "x-scheme-handler/https"
#"x-scheme-handler/http" = "io.gitlab.librewolf-community.desktop"; "x-scheme-handler/about"
#"x-scheme-handler/https" = "io.gitlab.librewolf-community.desktop"; "x-scheme-handler/unknown"
#"x-scheme-handler/about" = "io.gitlab.librewolf-community.desktop"; ] (n: ["librewolf.desktop" "firefox.desktop" "chromium-browser.desktop"])
#"x-scheme-handler/unknown" = "io.gitlab.librewolf-community.desktop"; ### Audio player
#"text/html" = "org.mozilla.firefox.desktop"; // lib.genAttrs [
#"x-scheme-handler/http" = "org.mozilla.firefox.desktop"; "audio/aac"
#"x-scheme-handler/https" = "org.mozilla.firefox.desktop"; "audio/flac"
#"x-scheme-handler/about" = "org.mozilla.firefox.desktop"; "audio/mpeg"
#"x-scheme-handler/unknown" = "org.mozilla.firefox.desktop"; "audio/ogg"
}; "audio/wav"
] (n: ["io.bassi.Amberol.desktop" "mpv.desktop"])
### Image viewer
// lib.genAttrs [
"image/gif"
"image/jpeg"
"image/png"
"image/webp"
] (n: ["org.gnome.Loupe.desktop"]);
}; };
} }