home/programs/media/zathura: add dynamic theming

This commit is contained in:
Anthony Rodriguez 2024-11-22 19:36:51 +01:00
parent 42a8fa724c
commit 1fb4f50121
Signed by: nezia
GPG key ID: EE3BE97C040A86CE

View file

@ -1,25 +1,68 @@
{pkgs, ...}: {
{
osConfig,
lib,
lib',
...
}: let
inherit (osConfig.theme.scheme) palette;
inherit (lib) mkIf mkMerge;
inherit (lib') rgba;
in {
programs.zathura = {
enable = true;
options = {
font = "Inter 12";
selection-notification = true;
options = mkMerge [
{
font = "Inter 12";
selection-notification = true;
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";
};
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";
}
(mkIf osConfig.theme.enable {
default-fg = palette.base05;
default-bg = palette.base00;
extraConfig = "include catppuccin-frappe";
};
xdg.configFile = {
"zathura/catppuccin-frappe".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-frappe";
hash = "sha256-xdWI/Ai3iE0zRF/9DCxILKmVaNWbfqHm7Xeh6eKM3MY=";
};
completion-bg = palette.base02;
completion-fg = palette.base05;
completion-highlight-bg = palette.base03;
completion-highlight-fg = palette.base05;
completion-group-bg = palette.base02;
completion-group-fg = palette.base0D;
statusbar-fg = palette.base05;
statusbar-bg = palette.base02;
notification-bg = palette.base02;
notification-fg = palette.base05;
notification-error-bg = palette.base02;
notification-error-fg = palette.base08;
notification-warning-bg = palette.base02;
notification-warning-fg = palette.base0A;
inputbar-fg = palette.base05;
inputbar-bg = palette.base02;
recolor = true;
recolor-lightcolor = palette.base00;
recolor-darkcolor = palette.base05;
index-fg = palette.base05;
index-bg = palette.base00;
index-active-fg = palette.base05;
index-active-bg = palette.base02;
render-loading-bg = palette.base00;
render-loading-fg = palette.base05;
highlight-color = rgba lib palette.base03 ".5";
highlight-fg = rgba lib palette.base0E ".5";
highlight-active-color = rgba lib palette.base0E ".5";
})
];
};
}