feat(k9s): Catppuccin -> Rose Pine
This commit is contained in:
parent
6cd932a7fa
commit
4c8ed054c1
2 changed files with 28 additions and 16 deletions
|
@ -156,6 +156,18 @@
|
||||||
"url": "https://github.com/catppuccin/k9s/archive/fdbec82284744a1fc2eb3e2d24cb92ef87ffb8b4.tar.gz",
|
"url": "https://github.com/catppuccin/k9s/archive/fdbec82284744a1fc2eb3e2d24cb92ef87ffb8b4.tar.gz",
|
||||||
"hash": "0cs7j1z0xq66w0700qcrc6ynzmw3bdr422p1rnkl7hxq8g4a67zn"
|
"hash": "0cs7j1z0xq66w0700qcrc6ynzmw3bdr422p1rnkl7hxq8g4a67zn"
|
||||||
},
|
},
|
||||||
|
"k9s-theme": {
|
||||||
|
"type": "Git",
|
||||||
|
"repository": {
|
||||||
|
"type": "GitHub",
|
||||||
|
"owner": "sasoria",
|
||||||
|
"repo": "k9s-theme"
|
||||||
|
},
|
||||||
|
"branch": "main",
|
||||||
|
"revision": "4ed8c473f16642b894bb501f1cd979fb670cce2d",
|
||||||
|
"url": "https://github.com/sasoria/k9s-theme/archive/4ed8c473f16642b894bb501f1cd979fb670cce2d.tar.gz",
|
||||||
|
"hash": "17lrv30wiql6i0ll33wng9ziizlzg9kx0wa960i900crfcq94168"
|
||||||
|
},
|
||||||
"lazygit": {
|
"lazygit": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -446,4 +458,4 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": 3
|
"version": 3
|
||||||
}
|
}
|
|
@ -3,34 +3,34 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
inherit (config.rose-pine) sources;
|
||||||
inherit (config.catppuccin) sources;
|
|
||||||
|
|
||||||
cfg = config.programs.k9s.catppuccin;
|
cfg = config.programs.k9s.rose-pine;
|
||||||
enable = cfg.enable && config.programs.k9s.enable;
|
enable = cfg.enable && config.programs.k9s.enable;
|
||||||
|
|
||||||
# NOTE: On MacOS specifically, k9s expects its configuration to be in
|
# NOTE: On MacOS specifically, k9s expects its configuration to be in
|
||||||
# `~/Library/Application Support` when not using XDG
|
# `~/Library/Application Support` when not using XDG.
|
||||||
enableXdgConfig = !pkgs.stdenv.hostPlatform.isDarwin || config.xdg.enable;
|
enableXdgConfig = !pkgs.stdenv.hostPlatform.isDarwin || config.xdg.enable;
|
||||||
|
|
||||||
themeName = "catppuccin-${cfg.flavor}" + lib.optionalString cfg.transparent "-transparent";
|
themeFile = "rose-pine.yaml";
|
||||||
themeFile = "${themeName}.yaml";
|
|
||||||
themePath = "k9s/skins/${themeFile}";
|
themePath = "k9s/skins/${themeFile}";
|
||||||
theme = sources.k9s + "/dist/${themeFile}";
|
theme = sources.k9s + "/skin.yml";
|
||||||
in
|
in {
|
||||||
{
|
options.programs.k9s.rose-pine = lib.rp.mkRosePineOpt {name = "k9s";};
|
||||||
options.programs.k9s.catppuccin = lib.ctp.mkCatppuccinOpt { name = "k9s"; } // {
|
|
||||||
transparent = lib.mkEnableOption "transparent version of flavor";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf enable (
|
config = lib.mkIf enable (
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
(lib.mkIf (!enableXdgConfig) {
|
(lib.mkIf (!enableXdgConfig) {
|
||||||
home.file."Library/Application Support/${themePath}".source = theme;
|
home.file."Library/Application Support/${themePath}".source = theme;
|
||||||
})
|
})
|
||||||
(lib.mkIf enableXdgConfig { xdg.configFile.${themePath}.source = theme; })
|
(lib.mkIf enableXdgConfig {
|
||||||
{ programs.k9s.settings.k9s.ui.skin = themeName; }
|
xdg.configFile.${themePath}.source = theme;
|
||||||
|
})
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.k9s.settings.k9s.ui.skin = "rose-pine";
|
||||||
|
}
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue