Skip to content

Commit

Permalink
feat(home-manager): init zathura module (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anomalocaridid authored Nov 3, 2023
1 parent e74013b commit 4ba874e
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 0 deletions.
20 changes: 20 additions & 0 deletions _sources/generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
12 changes: 12 additions & 0 deletions _sources/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
}
1 change: 1 addition & 0 deletions modules/home-manager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ in
./polybar.nix
./sway.nix
./tmux.nix
./zathura.nix
];
in
extendedLib.ctp.mapModules extendedLib files;
Expand Down
20 changes: 20 additions & 0 deletions modules/home-manager/zathura.nix
Original file line number Diff line number Diff line change
@@ -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
''));
}
4 changes: 4 additions & 0 deletions nvfetcher.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 1 addition & 0 deletions test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ in
neovim = ctpEnable;
starship = ctpEnable;
tmux = ctpEnable;
zathura = ctpEnable;
};

gtk = ctpEnable;
Expand Down

0 comments on commit 4ba874e

Please sign in to comment.