From 4ba874eaa973c4266994ccba4992ef5fee91bef7 Mon Sep 17 00:00:00 2001 From: Anomalocaridid <29845794+Anomalocaridid@users.noreply.github.com> Date: Fri, 3 Nov 2023 16:07:31 +0000 Subject: [PATCH] feat(home-manager): init zathura module (#53) --- _sources/generated.json | 20 ++++++++++++++++++++ _sources/generated.nix | 12 ++++++++++++ modules/home-manager/default.nix | 1 + modules/home-manager/zathura.nix | 20 ++++++++++++++++++++ nvfetcher.toml | 4 ++++ test.nix | 1 + 6 files changed, 58 insertions(+) create mode 100644 modules/home-manager/zathura.nix diff --git a/_sources/generated.json b/_sources/generated.json index ec09c48..30adaca 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -378,5 +378,25 @@ "type": "github" }, "version": "47e33044b4b47b1c1faca1e42508fc92be12131a" + }, + "zathura": { + "cargoLocks": null, + "date": "2022-09-27", + "extract": null, + "name": "zathura", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "catppuccin", + "repo": "zathura", + "rev": "d85d8750acd0b0247aa10e0653998180391110a4", + "sha256": "sha256-5Vh2bVabuBluVCJm9vfdnjnk32CtsK7wGIWM5+XnacM=", + "type": "github" + }, + "version": "d85d8750acd0b0247aa10e0653998180391110a4" } } \ No newline at end of file diff --git a/_sources/generated.nix b/_sources/generated.nix index 93fa1bf..bc5451a 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -229,4 +229,16 @@ }; date = "2023-11-01"; }; + zathura = { + pname = "zathura"; + version = "d85d8750acd0b0247aa10e0653998180391110a4"; + src = fetchFromGitHub { + owner = "catppuccin"; + repo = "zathura"; + rev = "d85d8750acd0b0247aa10e0653998180391110a4"; + fetchSubmodules = false; + sha256 = "sha256-5Vh2bVabuBluVCJm9vfdnjnk32CtsK7wGIWM5+XnacM="; + }; + date = "2022-09-27"; + }; } diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 6b06e09..268e7ca 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -25,6 +25,7 @@ in ./polybar.nix ./sway.nix ./tmux.nix + ./zathura.nix ]; in extendedLib.ctp.mapModules extendedLib files; diff --git a/modules/home-manager/zathura.nix b/modules/home-manager/zathura.nix new file mode 100644 index 0000000..5bfbae9 --- /dev/null +++ b/modules/home-manager/zathura.nix @@ -0,0 +1,20 @@ +{ config +, pkgs +, lib +, sources +}: +let + cfg = config.programs.zathura.catppuccin; + enable = cfg.enable && config.programs.zathura.enable; + themeFile = sources.zathura + /src/catppuccin-${cfg.flavour}; +in +{ + options.programs.zathura.catppuccin = + lib.ctp.mkCatppuccinOpt "zathura"; + + config.programs.zathura.options = lib.mkIf enable + (lib.ctp.fromINI + (pkgs.runCommand "catppuccin-zathura-theme" { } '' + ${pkgs.gawk}/bin/awk '/.+/ { printf "%s=%s\n", $2, $3 }' ${themeFile} > $out + '')); +} diff --git a/nvfetcher.toml b/nvfetcher.toml index 1bb6904..c8201e8 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -73,3 +73,7 @@ fetch.github = "catppuccin/sway" [tmux] src.git = "https://github.com/catppuccin/tmux.git" fetch.github = "catppuccin/tmux" + +[zathura] +src.git = "https://github.com/catppuccin/zathura.git" +fetch.github = "catppuccin/zathura" diff --git a/test.nix b/test.nix index 342c5be..463601b 100644 --- a/test.nix +++ b/test.nix @@ -64,6 +64,7 @@ in neovim = ctpEnable; starship = ctpEnable; tmux = ctpEnable; + zathura = ctpEnable; }; gtk = ctpEnable;