acadd94b31
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.
39 lines
906 B
Nix
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";
|
|
};
|
|
};
|
|
}
|