aboutsummaryrefslogtreecommitdiff
path: root/modules/users/zathura/default.nix
blob: f07707c0197daae443787e5d0264323751a6bfe7 (plain)
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
{
  config,
  lib,
  ...
}:
let
  cfg = config.nx.programs.zathura;
  inherit (lib) mkOption mkIf types;
in
{
  options.nx.programs.zathura = {
    enable = mkOption {
      default = false;
      description = "zathura document viewer";
      type = types.bool;
    };
  };

  config = mkIf cfg.enable {
    programs.zathura = {
      enable = true;
      options = {
        recolor-lightcolor = "rgba(0, 0, 0, 0)";
        recolor-darkcolor = "rgba(255, 255, 255, 1)";
        recolor = true;
        adjust-open = "width";
        guioptions = "none";
        zoom-center = true;
        page-padding = 0;
        pages-per-row = 1;
        scroll-page-aware = true;
      };

      mappings = {
        i = "recolor";
        j = "navigate previous";
        k = "navigate next";
      };
    };
  };
}