From 04374c0bc211ff6a40a74e2eadff36e0dda6c73f Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sat, 19 Oct 2024 17:37:49 -0700 Subject: [PATCH] feat(btop): Catppuccin -> Rose Pine --- .sources/sources.json | 8 ++++---- modules/home-manager/btop.nix | 25 +++++++++++++++---------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.sources/sources.json b/.sources/sources.json index e933182..b6dcdb5 100644 --- a/.sources/sources.json +++ b/.sources/sources.json @@ -40,13 +40,13 @@ "type": "Git", "repository": { "type": "GitHub", - "owner": "catppuccin", + "owner": "rose-pine", "repo": "btop" }, "branch": "main", - "revision": "21b8d5956a8b07fa52519e3267fb3a2d2e693d17", - "url": "https://github.com/catppuccin/btop/archive/21b8d5956a8b07fa52519e3267fb3a2d2e693d17.tar.gz", - "hash": "1hdh78314axpz96qvnl7dkgjd3b7sjq0l8k5h1iwir1mjz596xsi" + "revision": "6d6abdc0a8c8bcd3b056d9fe3256cfbe7e359312", + "url": "https://github.com/rose-pine/btop/archive/6d6abdc0a8c8bcd3b056d9fe3256cfbe7e359312.tar.gz", + "hash": "15s3llr9snrg30fh39a2gfzmjd8p5ki8vaggznm9jirjzdhm0a5i" }, "cava": { "type": "Git", diff --git a/modules/home-manager/btop.nix b/modules/home-manager/btop.nix index d14a844..3af8ea0 100644 --- a/modules/home-manager/btop.nix +++ b/modules/home-manager/btop.nix @@ -1,18 +1,23 @@ -{ config, lib, ... }: -let - inherit (config.catppuccin) sources; - cfg = config.programs.btop.catppuccin; +{ + config, + lib, + ... +}: let + inherit (config.rose-pine) sources; + cfg = config.programs.btop.rose-pine; enable = cfg.enable && config.programs.btop.enable; - themeFile = "catppuccin_${cfg.flavor}.theme"; - themePath = "/themes/${themeFile}"; + themeFile = + if (cfg.flavor == "main") + then "rose-pine.theme" + else "rose-pine-${cfg.flavor}.theme"; + themePath = "/${themeFile}"; theme = sources.btop + themePath; -in -{ - options.programs.btop.catppuccin = lib.ctp.mkCatppuccinOpt { name = "btop"; }; +in { + options.programs.btop.rose-pine = lib.rp.mkRosePineOpt {name = "btop";}; config = lib.mkIf enable { - xdg.configFile."btop${themePath}".source = theme; + xdg.configFile."btop/themes${themePath}".source = theme; programs.btop.settings.color_theme = themeFile; };