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,7 +1,17 @@
{pkgs, ...}: { {
osConfig,
lib,
lib',
...
}: let
inherit (osConfig.theme.scheme) palette;
inherit (lib) mkIf mkMerge;
inherit (lib') rgba;
in {
programs.zathura = { programs.zathura = {
enable = true; enable = true;
options = { options = mkMerge [
{
font = "Inter 12"; font = "Inter 12";
selection-notification = true; selection-notification = true;
@ -12,14 +22,47 @@
scroll-full-overlap = "0.01"; scroll-full-overlap = "0.01";
scroll-step = "100"; scroll-step = "100";
zoom-min = "10"; zoom-min = "10";
}; }
(mkIf osConfig.theme.enable {
default-fg = palette.base05;
default-bg = palette.base00;
extraConfig = "include catppuccin-frappe"; completion-bg = palette.base02;
}; completion-fg = palette.base05;
xdg.configFile = { completion-highlight-bg = palette.base03;
"zathura/catppuccin-frappe".source = pkgs.fetchurl { completion-highlight-fg = palette.base05;
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-frappe"; completion-group-bg = palette.base02;
hash = "sha256-xdWI/Ai3iE0zRF/9DCxILKmVaNWbfqHm7Xeh6eKM3MY="; 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";
})
];
}; };
} }