fix(home-manager): correctly set btop's theme (#48)
This commit is contained in:
parent
5713b478b1
commit
3a12806a37
1 changed files with 10 additions and 10 deletions
|
@ -8,7 +8,8 @@ let
|
||||||
cfg = config.programs.btop.catppuccin;
|
cfg = config.programs.btop.catppuccin;
|
||||||
enable = cfg.enable && config.programs.btop.enable;
|
enable = cfg.enable && config.programs.btop.enable;
|
||||||
|
|
||||||
themePath = "/themes/catppuccin_${cfg.flavour}.theme";
|
themeFile = "catppuccin_${cfg.flavour}.theme";
|
||||||
|
themePath = "/themes/${themeFile}";
|
||||||
theme =
|
theme =
|
||||||
pkgs.fetchFromGitHub
|
pkgs.fetchFromGitHub
|
||||||
{
|
{
|
||||||
|
@ -23,15 +24,14 @@ in
|
||||||
options.programs.btop.catppuccin =
|
options.programs.btop.catppuccin =
|
||||||
lib.ctp.mkCatppuccinOpt "btop" config;
|
lib.ctp.mkCatppuccinOpt "btop" config;
|
||||||
|
|
||||||
# xdg is required for this to work
|
config = mkIf enable
|
||||||
config =
|
|
||||||
{
|
{
|
||||||
xdg.enable = mkIf enable (lib.mkForce true);
|
xdg = {
|
||||||
|
# xdg is required for this to work
|
||||||
|
enable = lib.mkForce true;
|
||||||
|
configFile."btop${themePath}".source = theme;
|
||||||
|
};
|
||||||
|
|
||||||
programs.btop.settings.color_theme =
|
programs.btop.settings.color_theme = themeFile;
|
||||||
mkIf enable "${config.xdg.configHome + "/btop/${themePath}"}";
|
};
|
||||||
}
|
|
||||||
// (lib.mkIf enable {
|
|
||||||
xdg.configFile."btop${themePath}".source = theme;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue