about summary refs log tree commit diff
path: root/modules/zathura.nix
blob: cef841ce227df35de2ef4ef413ba63a43d71ffeb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{ 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 = {
      enable = true;

      options = {
        recolor = true;
        recolor-keephue = false;
        recolor-reverse-video = false;

        highlight-transparency = "0.3";

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

Consider giving Nix/NixOS a try! <3