fix nautilus and xdg mimetypes

discovered sushi is not working, however
This commit is contained in:
Noah Masur 2023-04-03 21:54:53 -04:00
parent c9ab46696d
commit 600fd06974
3 changed files with 31 additions and 6 deletions

View File

@ -50,11 +50,15 @@
xdg.mimeApps = {
associations.added = {
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
"image/jpeg" = [ "nsxiv.desktop" ];
"image/*" = [ "nsxiv.desktop" ];
};
associations.removed = { "application/pdf" = [ "mupdf.desktop" ]; };
associations.removed = {
"application/pdf" = [ "mupdf.desktop" "wine-extension-pdf.desktop" ];
};
defaultApplications = {
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
"image/jpeg" = [ "nsxiv.desktop" ];
"image/*" = [ "nsxiv.desktop" ];
};
};

View File

@ -17,9 +17,11 @@
gnome.sushi # Quick preview with spacebar
];
# Set default for opening directories
xdg.mimeApps.defaultApplications."inode/directory" =
[ "nautilus.desktop" ];
xsession.windowManager.i3.config.keybindings = {
"${
config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
}+n" = "exec --no-startup-id ${pkgs.gnome.nautilus}/bin/nautilus";
};
programs.fish.functions = {
qr = {
@ -27,8 +29,26 @@
"${pkgs.qrencode}/bin/qrencode $argv[1] -o /tmp/qr.png | ${pkgs.gnome.sushi}/bin/sushi /tmp/qr.png";
};
};
# Set default for opening directories
xdg.mimeApps = {
associations.added."inode/directory" = [ "org.gnome.Nautilus.desktop" ];
# associations.removed = {
# "inode/directory" = [ "kitty-open.desktop" ];
# };
defaultApplications."inode/directory" =
lib.mkBefore [ "org.gnome.Nautilus.desktop" ];
};
};
# # Set default for opening directories
# xdg.mime = {
# addedAssociations."inode/directory" = [ "org.gnome.Nautilus.desktop" ];
# removedAssociations = { "inode/directory" = [ "kitty-open.desktop" ]; };
# defaultApplications."inode/directory" =
# lib.mkForce [ "org.gnome.Nautilus.desktop" ];
# };
};
}

View File

@ -38,8 +38,9 @@ in {
name = "Neovim wrapper";
exec = "kitty nvim %F";
};
xdg.mimeApps = lib.mkIf pkgs.stdenv.isLinux {
defaultApplications."text/markdown" = [ "nvim.desktop" ];
xdg.mimeApps.defaultApplications = lib.mkIf pkgs.stdenv.isLinux {
"text/plain" = [ "nvim.desktop" ];
"text/markdown" = [ "nvim.desktop" ];
};
};