feat(kitty): Catppuccin -> Rose Pine
This commit is contained in:
parent
4c8ed054c1
commit
b5ecd9cab6
2 changed files with 35 additions and 11 deletions
|
@ -168,6 +168,18 @@
|
|||
"url": "https://github.com/sasoria/k9s-theme/archive/4ed8c473f16642b894bb501f1cd979fb670cce2d.tar.gz",
|
||||
"hash": "17lrv30wiql6i0ll33wng9ziizlzg9kx0wa960i900crfcq94168"
|
||||
},
|
||||
"kitty": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "rose-pine",
|
||||
"repo": "kitty"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "788bf1bf1a688dff9bbacbd9e516d83ac7dbd216",
|
||||
"url": "https://github.com/rose-pine/kitty/archive/788bf1bf1a688dff9bbacbd9e516d83ac7dbd216.tar.gz",
|
||||
"hash": "0a5r70q7g29b3fwz3i6rlj8jkyw5rc1pv92icndyc6lbb291bhq1"
|
||||
},
|
||||
"lazygit": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
|
|
|
@ -1,15 +1,27 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib) ctp;
|
||||
cfg = config.programs.kitty.catppuccin;
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.kitty.rose-pine;
|
||||
enable = cfg.enable && config.programs.kitty.enable;
|
||||
|
||||
# TODO: Remove after 24.11 is stable
|
||||
# https://github.com/nix-community/home-manager/pull/5750
|
||||
attrName = if (lib.versionAtLeast ctp.getModuleRelease "24.11") then "themeFile" else "theme";
|
||||
in
|
||||
{
|
||||
options.programs.kitty.catppuccin = ctp.mkCatppuccinOpt { name = "kitty"; };
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
themePath = "themes/${themeName}.conf";
|
||||
theme = sources.kitty + "/dist/${themeName}.conf";
|
||||
in {
|
||||
options.programs.kitty.rose-pine = lib.rp.mkRosePineOpt {name = "kitty";};
|
||||
|
||||
config = lib.mkIf enable { programs.kitty.${attrName} = "Catppuccin-${ctp.mkUpper cfg.flavor}"; };
|
||||
config = lib.mkIf enable {
|
||||
xdg.configFile."kitty/${themePath}".source = theme;
|
||||
|
||||
programs.kitty.settings = {
|
||||
include = themePath;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue