From 1995683357b6e230ae1fa5eb0f9bda234e8b5ae1 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sun, 20 Oct 2024 13:33:39 -0700 Subject: [PATCH] feat(zathura): Catppuccin -> Rose Pine --- .sources/sources.json | 11 +++++------ modules/home-manager/zathura.nix | 24 ++++++++++++++++-------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.sources/sources.json b/.sources/sources.json index 18e9e14..2b53445 100644 --- a/.sources/sources.json +++ b/.sources/sources.json @@ -364,13 +364,13 @@ "type": "Git", "repository": { "type": "GitHub", - "owner": "catppuccin", + "owner": "edunfelt", "repo": "zathura" }, "branch": "main", - "revision": "0adc53028d81bf047461bc61c43a484d11b15220", - "url": "https://github.com/catppuccin/zathura/archive/0adc53028d81bf047461bc61c43a484d11b15220.tar.gz", - "hash": "1cj1z2bh1qw1sbgqmk4i450yv7rgwcz06yhar23ccadsx22gzw7y" + "revision": "d72c431f8207a1f63c138d9bc64d689947c55e8e", + "url": "https://github.com/edunfelt/zathura/archive/d72c431f8207a1f63c138d9bc64d689947c55e8e.tar.gz", + "hash": "07b5pqdpd0qnhc223gmgw0nxy0wjbrkw6a36jdd03lyxvvhhx86r" }, "zsh-syntax-highlighting": { "type": "Git", @@ -386,5 +386,4 @@ } }, "version": 3 -} - +} \ No newline at end of file diff --git a/modules/home-manager/zathura.nix b/modules/home-manager/zathura.nix index 488ffe5..cb9f4ab 100644 --- a/modules/home-manager/zathura.nix +++ b/modules/home-manager/zathura.nix @@ -1,13 +1,21 @@ -{ config, lib, ... }: -let - inherit (config.catppuccin) sources; - cfg = config.programs.zathura.catppuccin; - enable = cfg.enable && config.programs.zathura.enable; -in { - options.programs.zathura.catppuccin = lib.ctp.mkCatppuccinOpt { name = "zathura"; }; + config, + lib, + ... +}: let + inherit (config.rose-pine) sources; + + cfg = config.programs.zathura.rose-pine; + enable = cfg.enable && config.programs.zathura.enable; + + themeName = + if (cfg.flavor == "main") + then "rose-pine" + else "rose-pine-${cfg.flavor}"; +in { + options.programs.zathura.rose-pine = lib.rp.mkRosePineOpt {name = "zathura";}; config.programs.zathura.extraConfig = lib.mkIf enable '' - include ${sources.zathura + "/src/catppuccin-${cfg.flavor}"} + include ${sources.zathura + "/${themeName}"} ''; }