{
  config,
  lib,
  ...
}: let
  cfg = config.soispha.programs.zathura;
in {
  options.soispha.programs.zathura = {
    enable = lib.mkEnableOption "zathura";
  };

  config.home-manager.users.soispha = lib.mkIf cfg.enable {
    programs.zathura = {
      enable = true;
      options = {
        # Use dark mode
        # recolor = true;
        # recolor-keephue = true;

        page-padding = 2;

        selection-notification = true;
        selection-clipboard = "clipboard";

        scroll-page-aware = true;

        guioptions = "";

        statusbar-home-tilde = true;
        window-title-basename = true;
      };

      # source: https://raw.githubusercontent.com/Daru-san/SnowyDots/master/modules/home/programs/zathura/default.nix
      # TODO: Add theming. <2024-10-18>
      # extraConfig = with config.colorScheme.palette; ''
      #   set notification-error-bg       "#${base03}" #525252
      #   set notification-error-fg       "#${base0A}" #ee5396
      #   set notification-warning-bg     "#${base03}" #525252
      #   set notification-warning-fg     "#${base0A}" #ee5398
      #   set notification-bg             "#${base03}" #525252
      #   set notification-fg             "#${base08}" #3ddbd9
      #
      #   set completion-group-bg         "#${base09}" #78a9ff
      #   set completion-group-fg         "#${base01}" #262626
      #   set completion-bg               "#${base09}" #78a9ff
      #   set completion-fg               "#${base01}" #262626
      #   set completion-highlight-bg     "#${base03}" #525252
      #   set completion-highlight-fg     "#${base0B}" #33b1ff
      #
      #   # Define the color in index mode
      #   set index-bg                   "#${base01}" #262626
      #   set index-fg                   "#${base04}" #dde1e6
      #   set index-active-bg             "#${base0B}" #33b1ff
      #   set index-active-fg             "#${base04}" #dde1e6
      #
      #   set inputbar-bg                 "#${base02}" #262626
      #   set inputbar-fg                 "#${base04}" #dde1e6
      #
      #   set statusbar-bg                "#${base02}" #262626
      #   set statusbar-fg                "#${base04}" #dde1e6
      #
      #   set default-bg                  "#${base00}" #161616
      #   set default-fg                  "#${base05}" #f2f4f8
      #
      #   set recolor-lightcolor          "#${base00}" #161616
      #   set recolor-darkcolor           "#${base05}" #f2f4f8
      # '';
    };

    home.sessionVariables = {
      READER = "zathura";
    };
  };
}