feat(home-manager): init zathura module (#53)

This commit is contained in:
Anomalocaridid 2023-11-03 16:07:31 +00:00 committed by GitHub
parent e74013b4ae
commit 4ba874eaa9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 58 additions and 0 deletions

View file

@ -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"
}
}

View file

@ -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";
};
}

View file

@ -25,6 +25,7 @@ in
./polybar.nix
./sway.nix
./tmux.nix
./zathura.nix
];
in
extendedLib.ctp.mapModules extendedLib files;

View file

@ -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
''));
}

View file

@ -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"

View file

@ -64,6 +64,7 @@ in
neovim = ctpEnable;
starship = ctpEnable;
tmux = ctpEnable;
zathura = ctpEnable;
};
gtk = ctpEnable;