{ config, lib, ... }: with lib; let cfg = config.nixfiles.modules.zathura; in { options.nixfiles.modules.zathura.enable = mkEnableOption "Zathura PDF reader"; config = mkIf cfg.enable { nixfiles.modules.common.xdg.defaultApplications."org.pwmt.zathura" = [ "application/pdf" "application/epub+zip" ]; hm.programs.zathura = with config.nixfiles.modules; { enable = true; options = (with config.colourScheme; { default-fg = white; default-bg = black; statusbar-fg = black; statusbar-bg = white; inputbar-fg = black; inputbar-bg = brightGreen; notification-fg = black; notification-bg = brightBlue; notification-warning-fg = black; notification-warning-bg = brightYellow; notification-error-fg = black; notification-error-bg = brightRed; highlight-color = brightYellow; highlight-active-color = yellow; completion-fg = brightWhite; completion-bg = brightBlack; completion-highlight-fg = black; completion-highlight-bg = brightRed; completion-group-fg = black; completion-group-bg = brightRed; recolor-darkcolor = black; recolor-lightcolor = white; }) // { recolor = true; recolor-keephue = false; recolor-reverse-video = false; highlight-transparency = "0.3"; font = config.fontScheme.monospaceFont.family; n-completion-items = 10; guioptions = ""; statusbar-basename = true; statusbar-home-tilde = true; statusbar-h-padding = 0; statusbar-v-padding = 0; window-height = 800; window-width = 600; window-icon = ""; abort-clear-search = true; incremental-search = true; adjust-open = "best-fit"; advance-pages-per-row = false; database = "sqlite"; dbus-service = false; page-padding = 0; pages-per-row = 1; render-loading = false; show-directories = true; show-hidden = true; show-recent = 10; link-zoom = true; link-hadjust = true; window-title-basename = true; window-title-home-tilde = true; window-title-page = true; zoom-center = false; zoom-max = 1000; zoom-min = 10; zoom-step = 10; scroll-hstep = -1; scroll-step = 40; scroll-full-overlap = 0; scroll-wrap = true; scroll-page-aware = false; selection-clipboard = "clipboard"; selection-notification = false; }; }; }; }