modularize zathura theme

This commit is contained in:
jacekpoz 2024-10-02 18:23:22 +02:00
parent 91e360360a
commit 631ee3fd13
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8
5 changed files with 42 additions and 13 deletions

View file

@ -128,7 +128,13 @@ in {
enable = true;
enableLsp = true;
};
zathura.enable = true;
zathura = {
enable = true;
themeFile = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha";
hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q=";
};
};
hypr = {
land = {
enable = true;

View file

@ -1,5 +1,6 @@
{
config,
pkgs,
...
}: {
services = {
@ -39,7 +40,13 @@
foot.enable = true;
mpv.enable = true;
neovim.enable = true;
zathura.enable = true;
zathura = {
enable = true;
themeFile = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha";
hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q=";
};
};
hypr = {
land.enable = true;
lock.enable = true;

View file

@ -87,7 +87,13 @@ in {
enable = true;
enableLsp = true;
};
zathura.enable = true;
zathura = {
enable = true;
themeFile = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha";
hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q=";
};
};
hypr = {
land = {
enable = true;

View file

@ -81,7 +81,13 @@ in {
enable = true;
enableLsp = true;
};
zathura.enable = true;
zathura = {
enable = true;
themeFile = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha";
hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q=";
};
};
hypr = {
land = {
enable = true;

View file

@ -1,28 +1,32 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.poz.programs.zathura;
inherit (config.poz.other.system) username;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) nullOr path;
in {
options.poz.programs.zathura.enable = mkEnableOption "zathura";
options.poz.programs.zathura = {
enable = mkEnableOption "zathura";
themeFile = mkOption {
type = nullOr path;
description = "path to theme file";
default = null;
};
};
config = mkIf cfg.enable {
home-manager.users.${username} = {
xdg.configFile."zathura/catppuccin-mocha".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha";
hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q=";
};
xdg.configFile."zathura/theme".source = mkIf (cfg.themeFile != null) cfg.themeFile;
programs.zathura = {
enable = true;
extraConfig = ''
include catppuccin-mocha
extraConfig = mkIf (cfg.themeFile != null) ''
include theme
'';
options = {
selection-clipboard = "clipboard";