aboutsummaryrefslogtreecommitdiffstats
path: root/modules/tools/viewer
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2024-09-25 19:41:02 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2024-09-25 19:41:02 +0530
commit478081af928e1557b325f4a4cbd5b67f079660d2 (patch)
treec7975b403c29acfd4de91664320e7ebbd0ac1685 /modules/tools/viewer
parent165cde749fc899d4c86eb6de97d3b7c4373eb7b3 (diff)
downloadhome-manager-config-478081af928e1557b325f4a4cbd5b67f079660d2.tar.gz
home-manager-config-478081af928e1557b325f4a4cbd5b67f079660d2.zip
Adding nnn file manager.
Adding bspwm bindings to sxhkd only if the module is enabled.
Diffstat (limited to 'modules/tools/viewer')
-rw-r--r--modules/tools/viewer/bat/default.nix12
-rw-r--r--modules/tools/viewer/bat/theme.tmTheme.mustache (renamed from modules/tools/viewer/bat/theme.nix)36
2 files changed, 24 insertions, 24 deletions
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.tmTheme.mustache
index dc22ceb..844b80d 100644
--- a/modules/tools/viewer/bat/theme.nix
+++ b/modules/tools/viewer/bat/theme.tmTheme.mustache
@@ -1,7 +1,3 @@
-config:
-
-with config.scheme.withHashtag;
-''
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
@@ -14,17 +10,17 @@ with config.scheme.withHashtag;
<key>settings</key>
<dict>
<key>background</key>
- <string>${base00}</string>
+ <string>#{{base00-hex}}</string>
<key>foreground</key>
- <string>${base05}</string>
+ <string>#{{base05-hex}}</string>
<key>caret</key>
- <string>${base07}</string>
+ <string>#{{base07-hex}}</string>
<key>invisibles</key>
- <string>${base03}</string>
+ <string>#{{base03-hex}}</string>
<key>lineHighlight</key>
- <string>${base02}</string>
+ <string>#{{base02-hex}}</string>
<key>selection</key>
- <string>${base03}</string>
+ <string>#{{base03-hex}}</string>
</dict>
</dict>
@@ -35,7 +31,7 @@ with config.scheme.withHashtag;
<key>settings</key>
<dict>
<key>foreground</key>
- <string>${base04}</string>
+ <string>#{{base04-hex}}</string>
</dict>
</dict>
@@ -45,7 +41,7 @@ with config.scheme.withHashtag;
<key>settings</key>
<dict>
<key>foreground</key>
- <string>${base0A}</string>
+ <string>#{{base0A-hex}}</string>
</dict>
</dict>
@@ -55,7 +51,7 @@ with config.scheme.withHashtag;
<key>settings</key>
<dict>
<key>foreground</key>
- <string>${base09}</string>
+ <string>#{{base09-hex}}</string>
</dict>
</dict>
@@ -65,7 +61,7 @@ with config.scheme.withHashtag;
<key>settings</key>
<dict>
<key>foreground</key>
- <string>${base08}</string>
+ <string>#{{base08-hex}}</string>
</dict>
</dict>
@@ -75,7 +71,7 @@ with config.scheme.withHashtag;
<key>settings</key>
<dict>
<key>foreground</key>
- <string>${base0D}</string>
+ <string>#{{base0D-hex}}</string>
</dict>
</dict>
@@ -85,7 +81,7 @@ with config.scheme.withHashtag;
<key>settings</key>
<dict>
<key>foreground</key>
- <string>${base0E}</string>
+ <string>#{{base0E-hex}}</string>
</dict>
</dict>
@@ -95,7 +91,7 @@ with config.scheme.withHashtag;
<key>settings</key>
<dict>
<key>foreground</key>
- <string>${base0B}</string>
+ <string>#{{base0B-hex}}</string>
</dict>
</dict>
@@ -105,7 +101,7 @@ with config.scheme.withHashtag;
<key>settings</key>
<dict>
<key>foreground</key>
- <string>${base0C}</string>
+ <string>#{{base0C-hex}}</string>
</dict>
</dict>
@@ -115,10 +111,10 @@ with config.scheme.withHashtag;
<key>settings</key>
<dict>
<key>foreground</key>
- <string>${base0F}</string>
+ <string>#{{base0F-hex}}</string>
</dict>
</dict>
</array>
</dict>
</plist>
-''
+