{
  pkgs,
  config,
  lib,
  ...
}: {
  home.packages = with pkgs; [
    ocrmypdf
  ];
  programs.zathura = {
    enable = true;
    options = {
      selection-clipboard = "clipboard";
      adjust-open = "best-fit";
      pages-per-row = 1;
      scroll-page-aware = "true";
      scroll-full-overlap = "0.01";
      scroll-step = 100;
      zoom-min = 10;
      recolor = true;
      recolor-keephue = true;
    };
    extraConfig = "include ${config.home.homeDirectory}/.config/zathura/zathura-matugen";
  };

  home.activation.createZathuraMatugen = lib.hm.dag.entryAfter ["writeBoundary"] ''
    if [ ! -f "${config.home.homeDirectory}/.config/zathura/zathura-matugen" ]; then
      touch "${config.home.homeDirectory}/.config/zathura/zathura-matugen"
    fi
  '';

  xdg.mimeApps = {
    enable = true;
    defaultApplications = {
      "application/pdf" = "org.pwmt.zathura.desktop";
    };
  };
}
