From c0c5087218c27e31c3e6f66f3937bff22fa0f647 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Tue, 24 Sep 2024 23:13:51 +0530 Subject: Using nix flake modules to manage the configurations. --- modules/tools/viewer/bat/default.nix | 14 ++++ modules/tools/viewer/bat/theme.nix | 124 +++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 modules/tools/viewer/bat/default.nix create mode 100644 modules/tools/viewer/bat/theme.nix (limited to 'modules/tools/viewer/bat') diff --git a/modules/tools/viewer/bat/default.nix b/modules/tools/viewer/bat/default.nix new file mode 100644 index 0000000..cc01f82 --- /dev/null +++ b/modules/tools/viewer/bat/default.nix @@ -0,0 +1,14 @@ +{ config, lib, ... }: + +{ + options = { + bat.enable = lib.mkEnableOption "Enables bat."; + }; + + config = lib.mkIf config.bat.enable { + programs.bat.enable = true; + programs.bat.config.theme = "customTheme"; + xdg.configFile."bat/themes/customTheme.tmTheme".text + = import ./theme.nix config; + }; +} diff --git a/modules/tools/viewer/bat/theme.nix b/modules/tools/viewer/bat/theme.nix new file mode 100644 index 0000000..e345ee4 --- /dev/null +++ b/modules/tools/viewer/bat/theme.nix @@ -0,0 +1,124 @@ +config: + +with config.scheme.withHashtag; +'' + + + + name + customTheme + settings + + + + settings + + background + #0F1419 + foreground + #E6E1CF + caret + #F3F4F5 + invisibles + #3E4B59 + lineHighlight + #272D38 + selection + #3E4B59 + + + + + + scope + comment + settings + + foreground + #BFBDB6 + + + + + scope + string + settings + + foreground + #FFB454 + + + + + scope + constant.numeric + settings + + foreground + #FF8F40 + + + + + scope + variable + settings + + foreground + #F07178 + + + + + scope + keyword + settings + + foreground + #59C2FF + + + + + scope + support.function + settings + + foreground + #D2A6FF + + + + + scope + constant.language + settings + + foreground + #B8CC52 + + + + + scope + entity.name.tag + settings + + foreground + #95E6CB + + + + + scope + invalid + settings + + foreground + #E6B673 + + + + + +'' -- cgit v1.2.3