Files
nixos/apps/zathura/default.nix
T
kenji acadd94b31 fix(zathura): added ocr for easier ctrl+f
zathura had an issue where pdf's cannot be read via `find word` due to
the process being unable to read `image text`. a solution is to convert
it to ocr.
2026-03-07 07:18:57 -06:00

39 lines
906 B
Nix

{
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";
};
};
}