Skip to content

Commit

Permalink
refactor: move bat and delta theme to theme module
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Oct 15, 2023
1 parent 94b99e5 commit dd8b8a6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
16 changes: 16 additions & 0 deletions modules/home/desktop/theme/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,22 @@ in
};

config = mkIf cfg.enable {
#bat
programs.bat = {
config.theme = "${cfg.selectedTheme.name}-${cfg.selectedTheme.variant}";

themes = {
"${cfg.selectedTheme.name}-${cfg.selectedTheme.variant}" = {
src = cfg.package;
file = "/bat/Catppuccin-${cfg.selectedTheme.variant}.tmTheme";
};
};
};

programs.git.delta.options = {
syntax-theme = mkIf config.khanelinix.tools.bat.enable "${cfg.selectedTheme.name}-${cfg.selectedTheme.variant}";
};

#bottom
programs.bottom.settings = builtins.fromTOML (builtins.readFile (cfg.package + "/bottom/${cfg.selectedTheme.variant}.toml"));

Expand Down
8 changes: 0 additions & 8 deletions modules/home/tools/bat/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ in
enable = true;

config = {
theme = "catppuccin-macchiato";
style = "auto,header-filesize";
};

Expand All @@ -32,13 +31,6 @@ in
batwatch
prettybat
];

themes = {
catppuccin-macchiato = {
src = pkgs.catppuccin;
file = "/bat/Catppuccin-macchiato.tmTheme";
};
};
};

home.shellAliases = {
Expand Down
4 changes: 0 additions & 4 deletions modules/home/tools/git/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ in

delta = {
enable = true;

options = {
syntax-theme = mkIf config.khanelinix.tools.bat.enable "catppuccin-macchiato";
};
};

extraConfig = {
Expand Down

0 comments on commit dd8b8a6

Please sign in to comment.