From 8b0d9317edd57c5374adcf6957ae4775875c2a9d Mon Sep 17 00:00:00 2001 From: Flameopathic <64027365+Flameopathic@users.noreply.github.com> Date: Sun, 20 Apr 2025 09:12:10 -0400 Subject: [PATCH] btop: use theme option (#1126) Use the programs.btop.theme option, introduced in commit [1] ("btop: add themes option (#6777)"). [1]: https://github.com/nix-community/home-manager/commit/0daadc77840a1ed34cafa581f8b0ab08cb2fcadc Link: https://github.com/danth/stylix/pull/1126 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> --- flake.lock | 6 +++--- modules/btop/hm.nix | 15 +++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index 76531c2a..e31a0bff 100644 --- a/flake.lock +++ b/flake.lock @@ -224,11 +224,11 @@ ] }, "locked": { - "lastModified": 1743869639, - "narHash": "sha256-Xhe3whfRW/Ay05z9m1EZ1/AkbV1yo0tm1CbgjtCi4rQ=", + "lastModified": 1744618730, + "narHash": "sha256-n3gN7aHwVRnnBZI64EDoKyJnWidNYJ0xezhqQtdjH2Q=", "owner": "nix-community", "repo": "home-manager", - "rev": "d094c6763c6ddb860580e7d3b4201f8f496a6836", + "rev": "85dd758c703ffbf9d97f34adcef3a898b54b4014", "type": "github" }, "original": { diff --git a/modules/btop/hm.nix b/modules/btop/hm.nix index fc7d265e..902d6f78 100644 --- a/modules/btop/hm.nix +++ b/modules/btop/hm.nix @@ -11,14 +11,12 @@ && config.programs.btop.enable ) { - - programs.btop.settings = { - color_theme = "stylix"; - theme_background = lib.mkIf (config.stylix.opacity.terminal != 1.0) false; - }; - - xdg.configFile."btop/themes/stylix.theme".text = - with config.lib.stylix.colors.withHashtag; '' + programs.btop = { + settings = { + color_theme = "stylix"; + theme_background = lib.mkIf (config.stylix.opacity.terminal != 1.0) false; + }; + themes.stylix = with config.lib.stylix.colors.withHashtag; '' #Generated by Stylix theme[main_bg]="${base00}" theme[main_fg]="${base05}" @@ -63,5 +61,6 @@ theme[process_mid]="${base0A}" theme[process_end]="${base08}" ''; + }; }; }