attempt to set default apps for xdg-open

This commit is contained in:
Noah Masur 2023-02-17 18:14:57 -05:00
parent 37fa835c66
commit e8c5a10df7
2 changed files with 19 additions and 6 deletions

View File

@ -10,12 +10,21 @@
}; };
config = lib.mkIf (config.gui.enable && config.media.enable) { config = lib.mkIf (config.gui.enable && config.media.enable) {
home-manager.users.${config.user}.home.packages = with pkgs; [ home-manager.users.${config.user} = {
mpv # Video viewer home.packages = with pkgs; [
sxiv # Image viewer mpv # Video viewer
mupdf # PDF viewer sxiv # Image viewer
zathura # PDF 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" ];
};
}; };
} }

View File

@ -17,6 +17,10 @@
gnome.sushi # Quick preview with spacebar gnome.sushi # Quick preview with spacebar
]; ];
# Set default for opening directories
xdg.mimeApps.defaultApplications."inode/directory" =
[ "nautilus.desktop" ];
programs.fish.functions = { programs.fish.functions = {
qr = { qr = {
body = body =