From 82e69967ed0053a19d708e67b83353af4a6de6f2 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sat, 19 Oct 2024 11:24:15 -0700 Subject: [PATCH] feat(bat): Catppuccin -> Rose Pine --- .sources/sources.json | 12 ++++++++++++ modules/home-manager/bat.nix | 25 +++++++++++++++---------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.sources/sources.json b/.sources/sources.json index 3eb9f1e..e933182 100644 --- a/.sources/sources.json +++ b/.sources/sources.json @@ -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": { diff --git a/modules/home-manager/bat.nix b/modules/home-manager/bat.nix index d8b4259..4253705 100644 --- a/modules/home-manager/bat.nix +++ b/modules/home-manager/bat.nix @@ -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"; }; }; };