diff --git a/modules/applications/media.nix b/modules/applications/media.nix index c2a1620..84fe7eb 100644 --- a/modules/applications/media.nix +++ b/modules/applications/media.nix @@ -10,12 +10,21 @@ }; config = lib.mkIf (config.gui.enable && config.media.enable) { - home-manager.users.${config.user}.home.packages = with pkgs; [ - mpv # Video viewer - sxiv # Image viewer - mupdf # PDF viewer - zathura # PDF viewer - ]; + home-manager.users.${config.user} = { + home.packages = with pkgs; [ + mpv # Video viewer + sxiv # Image viewer + mupdf # PDF viewer + zathura # PDF viewer + ]; + + # Set default for opening PDFs + xdg.mimeApps.defaultApplications."application/pdf" = + [ "zathura.desktop" ]; + xdg.mimeApps.defaultApplications."image/*" = [ "sxiv.desktop" ]; + + }; + }; } diff --git a/modules/applications/nautilus.nix b/modules/applications/nautilus.nix index 3c81b0b..d8610e6 100644 --- a/modules/applications/nautilus.nix +++ b/modules/applications/nautilus.nix @@ -17,6 +17,10 @@ gnome.sushi # Quick preview with spacebar ]; + # Set default for opening directories + xdg.mimeApps.defaultApplications."inode/directory" = + [ "nautilus.desktop" ]; + programs.fish.functions = { qr = { body =