From de5e4fe049211df1b1ac2a5529dafe3fe941bcfa Mon Sep 17 00:00:00 2001 From: prescientmoon Date: Wed, 18 Sep 2024 09:28:18 +0200 Subject: [PATCH] Make zathura the default for opening pdf files --- home/features/desktop/zathura.nix | 7 ++++--- home/global.nix | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/home/features/desktop/zathura.nix b/home/features/desktop/zathura.nix index e7d47bd..c384fd1 100644 --- a/home/features/desktop/zathura.nix +++ b/home/features/desktop/zathura.nix @@ -87,9 +87,10 @@ home.shellAliases.pdf = "zathura --fork"; + # Make zathura the default app for opening pdfs. + xdg.mimeApps.defaultApplications."application/pdf" = [ "org.pwmt.zathura.desktop" ]; + # {{{ Persistence - satellite.persistence.at.state.apps.zathura.directories = [ - "${config.xdg.dataHome}/zathura" - ]; + satellite.persistence.at.state.apps.zathura.directories = [ "${config.xdg.dataHome}/zathura" ]; # }}} } diff --git a/home/global.nix b/home/global.nix index 867fdae..8b0f404 100644 --- a/home/global.nix +++ b/home/global.nix @@ -66,6 +66,9 @@ in # Nicely reload system units when changing configs systemd.user.startServices = lib.mkForce "sd-switch"; + # Enable default application management + xdg.mimeApps.enable = true; + # Tell sops-nix to use ssh keys for decrypting secrets sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];