From 68982b7f2a416e063df4f3fbb5201910099bd487 Mon Sep 17 00:00:00 2001 From: colin Date: Mon, 26 Sep 2022 02:21:09 -0700 Subject: [PATCH] env/home: associate audio/video mime types with good default apps --- modules/universal/env/home-manager.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/universal/env/home-manager.nix b/modules/universal/env/home-manager.nix index 4e121365..6b266c4e 100644 --- a/modules/universal/env/home-manager.nix +++ b/modules/universal/env/home-manager.nix @@ -96,14 +96,29 @@ in templates = "$HOME/.xdg/Templates"; videos = "$HOME/Videos"; }; + + # the xdg mime type for a file can be found with: + # - `xdg-mime query filetype path/to/thing.ext` xdg.mimeApps.enable = true; xdg.mimeApps.defaultApplications = { + # HTML "text/html" = [ "librewolf.desktop" ]; "x-scheme-handler/http" = [ "librewolf.desktop" ]; "x-scheme-handler/https" = [ "librewolf.desktop" ]; "x-scheme-handler/about" = [ "librewolf.desktop" ]; "x-scheme-handler/unknown" = [ "librewolf.desktop" ]; + # IMAGES + "image/heif" = [ "org.gnome.gThumb.desktop" ]; # apple codec "image/png" = [ "org.gnome.gThumb.desktop" ]; + "image/jpeg" = [ "org.gnome.gThumb.desktop" ]; + # VIDEO + "video/mp4" = [ "vlc.desktop" ]; + "video/quicktime" = [ "vlc.desktop" ]; + "video/x-matroska" = [ "vlc.desktop" ]; + # AUDIO + "audio/flag" = [ "vlc.desktop" ]; + "audio/mpeg" = [ "vlc.desktop" ]; + "audio/x-vorbis+ogg" = [ "vlc.desktop" ]; }; # convenience