From 085ff668ab45ac8d57c093e502b1175a86f2c14e Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Thu, 10 Jul 2025 01:29:48 +0530 Subject: Removed unnecessary packages. --- modules/tools/bat/default.nix | 22 ++++++ modules/tools/bat/theme.mustache.tmTheme | 120 +++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 modules/tools/bat/default.nix create mode 100644 modules/tools/bat/theme.mustache.tmTheme (limited to 'modules/tools/bat') diff --git a/modules/tools/bat/default.nix b/modules/tools/bat/default.nix new file mode 100644 index 0000000..d459042 --- /dev/null +++ b/modules/tools/bat/default.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: + +{ + options.tools.bat = { + enable = lib.mkEnableOption "Enables bat."; + }; + + config = lib.mkIf config.tools.bat.enable { + programs.bat.enable = true; + programs.bat.config = { + tabs = "4"; + theme = "custom-theme"; + }; + # shell.alias."cat" = "${pkgs.bat}/bin/bat -pp"; + # shell.alias."less" = "${pkgs.bat}/bin/bat --paging always"; + # home.sessionVariables."PAGER" = "${pkgs.bat}/bin/bat --paging always"; + xdg.configFile."bat/themes/custom-theme.tmTheme".source + = config.scheme { + template = builtins.readFile ./theme.mustache.tmTheme; + }; + }; +} diff --git a/modules/tools/bat/theme.mustache.tmTheme b/modules/tools/bat/theme.mustache.tmTheme new file mode 100644 index 0000000..844b80d --- /dev/null +++ b/modules/tools/bat/theme.mustache.tmTheme @@ -0,0 +1,120 @@ + + + + name + customTheme + settings + + + + settings + + background + #{{base00-hex}} + foreground + #{{base05-hex}} + caret + #{{base07-hex}} + invisibles + #{{base03-hex}} + lineHighlight + #{{base02-hex}} + selection + #{{base03-hex}} + + + + + + scope + comment + settings + + foreground + #{{base04-hex}} + + + + + scope + string + settings + + foreground + #{{base0A-hex}} + + + + + scope + constant.numeric + settings + + foreground + #{{base09-hex}} + + + + + scope + variable + settings + + foreground + #{{base08-hex}} + + + + + scope + keyword + settings + + foreground + #{{base0D-hex}} + + + + + scope + support.function + settings + + foreground + #{{base0E-hex}} + + + + + scope + constant.language + settings + + foreground + #{{base0B-hex}} + + + + + scope + entity.name.tag + settings + + foreground + #{{base0C-hex}} + + + + + scope + invalid + settings + + foreground + #{{base0F-hex}} + + + + + + -- cgit v1.2.3