From 3e232a2bc7f5c8ea33804be1ea071a91c5f98055 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Fri, 24 Apr 2026 01:48:30 +0530 Subject: replacing tools with programs to be more consistent with config options --- modules/programs/bat/base16.mustache.tmTheme | 534 +++++++++++++++++++++++++++ modules/programs/bat/default.nix | 26 ++ 2 files changed, 560 insertions(+) create mode 100644 modules/programs/bat/base16.mustache.tmTheme create mode 100644 modules/programs/bat/default.nix (limited to 'modules/programs/bat') diff --git a/modules/programs/bat/base16.mustache.tmTheme b/modules/programs/bat/base16.mustache.tmTheme new file mode 100644 index 0000000..6b2cd5b --- /dev/null +++ b/modules/programs/bat/base16.mustache.tmTheme @@ -0,0 +1,534 @@ + + + + + name + OneDark Dark + author + olimorris (https://github.com/olimorris) + settings + + + + + settings + + background + #{{base00}} + foreground + #{{base05}} + caret + #{{base05}} + invisibles + #{{base03}} + lineHighlight + #{{base01}} + selection + #{{base02}} + selectionBorder + #{{base03}} + findHighlight + #{{base0A}} + findHighlightForeground + #{{base00}} + activeGuide + #{{base03}} + bracketsForeground + #{{base05}} + bracketsOptions + underline + bracketContentsForeground + #{{base05}} + bracketContentsOptions + underline + tagsOptions + stippled_underline + gutterForeground + #{{base03}} + gutter + #{{base01}} + + + + + + name + Comment + scope + comment, punctuation.definition.comment + settings + + foreground + #{{base03}} + fontStyle + italic + + + + + + name + Variable + scope + variable, variable.other + settings + + foreground + #{{base05}} + + + + + name + Variable - Language + scope + variable.language + settings + + foreground + #{{base0E}} + fontStyle + italic + + + + + + name + Keyword + scope + keyword, keyword.control + settings + + foreground + #{{base0E}} + + + + + name + Keyword - Operator + scope + keyword.operator + settings + + foreground + #{{base0C}} + + + + + + name + Storage + scope + storage, storage.type, storage.modifier + settings + + foreground + #{{base0E}} + + + + + + name + Constant + scope + constant, constant.other + settings + + foreground + #{{base09}} + + + + + name + Constant - Numeric + scope + constant.numeric + settings + + foreground + #{{base09}} + + + + + name + Constant - Language + scope + constant.language + settings + + foreground + #{{base09}} + + + + + name + Constant - Character Escape + scope + constant.character.escape + settings + + foreground + #{{base0C}} + + + + + + name + String + scope + string + settings + + foreground + #{{base0B}} + + + + + name + String - Punctuation + scope + punctuation.definition.string + settings + + foreground + #{{base0B}} + + + + + + name + Support - Function + scope + support.function + settings + + foreground + #{{base0D}} + + + + + name + Support - Class + scope + support.class + settings + + foreground + #{{base0A}} + + + + + name + Support - Type + scope + support.type + settings + + foreground + #{{base0C}} + + + + + name + Support - Constant + scope + support.constant + settings + + foreground + #{{base09}} + + + + + + name + Entity - Name - Function + scope + entity.name.function + settings + + foreground + #{{base0D}} + + + + + name + Entity - Name - Class / Type + scope + entity.name.class, entity.name.type, entity.name.type.class + settings + + foreground + #{{base0A}} + + + + + name + Entity - Name - Tag + scope + entity.name.tag + settings + + foreground + #{{base08}} + + + + + name + Entity - Other - Attribute Name + scope + entity.other.attribute-name + settings + + foreground + #{{base09}} + + + + + name + Entity - Other - Inherited Class + scope + entity.other.inherited-class + settings + + foreground + #{{base0A}} + fontStyle + italic + + + + + + name + Punctuation + scope + punctuation + settings + + foreground + #{{base05}} + + + + + name + Punctuation - Section + scope + punctuation.section, meta.brace + settings + + foreground + #{{base05}} + + + + + + name + Invalid + scope + invalid + settings + + foreground + #{{base07}} + background + #{{base08}} + + + + + name + Invalid - Deprecated + scope + invalid.deprecated + settings + + foreground + #{{base07}} + background + #{{base0F}} + + + + + + name + Diff - Inserted + scope + markup.inserted + settings + + foreground + #{{base0B}} + + + + + name + Diff - Deleted + scope + markup.deleted + settings + + foreground + #{{base08}} + + + + + name + Diff - Changed + scope + markup.changed + settings + + foreground + #{{base0E}} + + + + + + name + Markup - Heading + scope + markup.heading, entity.name.section + settings + + foreground + #{{base0D}} + fontStyle + bold + + + + + name + Markup - Bold + scope + markup.bold + settings + + foreground + #{{base09}} + fontStyle + bold + + + + + name + Markup - Italic + scope + markup.italic + settings + + foreground + #{{base0E}} + fontStyle + italic + + + + + name + Markup - Inline Code + scope + markup.inline.raw, markup.raw.inline + settings + + foreground + #{{base0C}} + + + + + name + Markup - Link + scope + markup.underline.link, string.other.link + settings + + foreground + #{{base0D}} + fontStyle + underline + + + + + name + Markup - Quote + scope + markup.quote + settings + + foreground + #{{base0B}} + fontStyle + italic + + + + + name + Markup - List + scope + markup.list, punctuation.definition.list + settings + + foreground + #{{base08}} + + + + + + name + Meta - Function Call + scope + meta.function-call + settings + + foreground + #{{base0D}} + + + + + name + Meta - Preprocessor + scope + meta.preprocessor + settings + + foreground + #{{base09}} + + + + + uuid + a6f0d8c2-3b1e-4f5a-9c7d-2e8b0f4a6d1c + + diff --git a/modules/programs/bat/default.nix b/modules/programs/bat/default.nix new file mode 100644 index 0000000..3c962a3 --- /dev/null +++ b/modules/programs/bat/default.nix @@ -0,0 +1,26 @@ +{ + config, + lib, + pkgs, + ... +}: + +# bat - a cat clone with wings +{ + config = lib.mkIf config.programs.bat.enable { + programs.bat = { + config = { + theme = "base16"; + }; + themes = { + base16 = { + src = pkgs.runCommand "bat-base16-theme" { } '' + mkdir -p $out + cp ${config.scheme { template = ./base16.mustache.tmTheme; }} $out/base16.tmTheme + ''; + file = "base16.tmTheme"; + }; + }; + }; + }; +} -- cgit v1.2.3