marleyos/home/bat/default.nix

63 lines
1,018 B
Nix
Raw Normal View History

2024-10-29 20:13:02 -07:00
{
pkgs,
config,
lib,
...
}: {
2024-10-19 17:25:26 -07:00
programs.bat = {
enable = true;
extraPackages = with pkgs.bat-extras; [
batdiff
batman
];
rose-pine.enable = true;
config = {
style = "auto";
};
};
2024-10-29 20:13:02 -07:00
home.sessionVariables = lib.mkIf config.home.preferXdgDirectories {
BATDIFF_USE_DELTA = true;
};
2024-10-29 20:13:02 -07:00
programs.fish = lib.mkIf config.programs.fish.enable {
2024-10-29 20:13:02 -07:00
functions = {
cat = {
wraps = "bat";
body = "bat $argv";
};
cath = {
wraps = "bat";
body = "bat --plain --language=help $argv";
};
};
shellAbbrs = {
B = {
position = "anywhere";
setCursor = true;
expansion = "% | bat";
};
"-h" = {
position = "anywhere";
expansion = "-h | cath";
};
"--help" = {
position = "anywhere";
expansion = "--help | cath";
};
help = {
position = "anywhere";
expansion = "help | cath";
};
};
};
2024-10-19 17:25:26 -07:00
}