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 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'modules/tools/viewer/bat/default.nix') 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; + }; }; } -- cgit v1.2.3