From 478081af928e1557b325f4a4cbd5b67f079660d2 Mon Sep 17 00:00:00 2001
From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>
Date: Wed, 25 Sep 2024 19:41:02 +0530
Subject: Adding nnn file manager.
Adding bspwm bindings to sxhkd only if the module is enabled.
---
modules/tools/viewer/bat/default.nix | 12 ++-
modules/tools/viewer/bat/theme.nix | 124 ------------------------
modules/tools/viewer/bat/theme.tmTheme.mustache | 120 +++++++++++++++++++++++
3 files changed, 128 insertions(+), 128 deletions(-)
delete mode 100644 modules/tools/viewer/bat/theme.nix
create mode 100644 modules/tools/viewer/bat/theme.tmTheme.mustache
(limited to 'modules/tools/viewer/bat')
diff --git a/modules/tools/viewer/bat/default.nix b/modules/tools/viewer/bat/default.nix
index 915b4b2..73bdefd 100644
--- a/modules/tools/viewer/bat/default.nix
+++ b/modules/tools/viewer/bat/default.nix
@@ -1,4 +1,4 @@
-{ config, lib, ... }:
+{ config, lib, pkgs, ... }:
{
options.tools.viewer.bat = {
@@ -7,8 +7,12 @@
config = lib.mkIf config.tools.viewer.bat.enable {
programs.bat.enable = true;
- programs.bat.config.theme = "customTheme";
- xdg.configFile."bat/themes/customTheme.tmTheme".text
- = import ./theme.nix config;
+ programs.bat.config.theme = "custom-theme";
+ shell.alias."cbat" = "${pkgs.bat}/bin/bat -pp";
+ home.sessionVariables."PAGER" = "${pkgs.bat}/bin/bat --paging always";
+ xdg.configFile."bat/themes/custom-theme.tmTheme".source
+ = config.scheme {
+ template = builtins.readFile ./theme.tmTheme.mustache;
+ };
};
}
diff --git a/modules/tools/viewer/bat/theme.nix b/modules/tools/viewer/bat/theme.nix
deleted file mode 100644
index dc22ceb..0000000
--- a/modules/tools/viewer/bat/theme.nix
+++ /dev/null
@@ -1,124 +0,0 @@
-config:
-
-with config.scheme.withHashtag;
-''
-
-
-
- name
- customTheme
- settings
-
-
-
- settings
-
- background
- ${base00}
- foreground
- ${base05}
- caret
- ${base07}
- invisibles
- ${base03}
- lineHighlight
- ${base02}
- selection
- ${base03}
-
-
-
-
-
- scope
- comment
- settings
-
- foreground
- ${base04}
-
-
-
-
- scope
- string
- settings
-
- foreground
- ${base0A}
-
-
-
-
- scope
- constant.numeric
- settings
-
- foreground
- ${base09}
-
-
-
-
- scope
- variable
- settings
-
- foreground
- ${base08}
-
-
-
-
- scope
- keyword
- settings
-
- foreground
- ${base0D}
-
-
-
-
- scope
- support.function
- settings
-
- foreground
- ${base0E}
-
-
-
-
- scope
- constant.language
- settings
-
- foreground
- ${base0B}
-
-
-
-
- scope
- entity.name.tag
- settings
-
- foreground
- ${base0C}
-
-
-
-
- scope
- invalid
- settings
-
- foreground
- ${base0F}
-
-
-
-
-
-''
diff --git a/modules/tools/viewer/bat/theme.tmTheme.mustache b/modules/tools/viewer/bat/theme.tmTheme.mustache
new file mode 100644
index 0000000..844b80d
--- /dev/null
+++ b/modules/tools/viewer/bat/theme.tmTheme.mustache
@@ -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