feat(bat): Catppuccin -> Rose Pine

This commit is contained in:
punkfairie 2024-10-19 11:24:15 -07:00
parent b79da5a923
commit 82e69967ed
Signed by: punkfairie
GPG key ID: 01823C057725C266
2 changed files with 27 additions and 10 deletions

View file

@ -420,6 +420,18 @@
"url": "https://github.com/catppuccin/swaylock/archive/77246bbbbf8926bdb8962cffab6616bc2b9e8a06.tar.gz",
"hash": "02nql7ry71fxlhj0vsbsxi3jrmfajxmapr9gg0mzp0k0bxwqxa00"
},
"tm-theme": {
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "rose-pine",
"repo": "tm-theme"
},
"branch": "main",
"revision": "c4235f9a65fd180ac0f5e4396e3a86e21a0884ec",
"url": "https://github.com/rose-pine/tm-theme/archive/c4235f9a65fd180ac0f5e4396e3a86e21a0884ec.tar.gz",
"hash": "19k0r1mrhqhlf1xfzvd1q8ihpic86f84kbmgy0m314w3w9cbqf4f"
},
"tmux": {
"type": "Git",
"repository": {

View file

@ -1,20 +1,25 @@
{ config, lib, ... }:
let
inherit (config.catppuccin) sources;
cfg = config.programs.bat.catppuccin;
enable = cfg.enable && config.programs.bat.enable;
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavor}";
in
{
options.programs.bat.catppuccin = lib.ctp.mkCatppuccinOpt { name = "bat"; };
config,
lib,
...
}: let
inherit (config.rose-pine) sources;
cfg = config.programs.bat.rose-pine;
enable = cfg.enable && config.programs.bat.enable;
themeName =
if (cfg.flavor == "main")
then "rose-pine"
else "rose-pine-${cfg.flavor}";
in {
options.programs.bat.rose-pine = lib.rp.mkRosePineOpt {name = "bat";};
config = lib.mkIf enable {
programs.bat = {
config.theme = themeName;
themes.${themeName} = {
src = sources.bat;
file = "themes/${themeName}.tmTheme";
src = sources.tm-theme;
file = "dist/themes/${themeName}.tmTheme";
};
};
};