2024-10-29 20:13:02 -07:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2024-11-02 15:35:48 -07:00
|
|
|
}:
|
|
|
|
{
|
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
|
|
|
|
2024-10-30 20:09:08 -07:00
|
|
|
home.sessionVariables = lib.mkIf config.home.preferXdgDirectories {
|
2024-10-30 20:22:10 -07:00
|
|
|
BATDIFF_USE_DELTA = "true";
|
2024-10-30 20:09:08 -07:00
|
|
|
};
|
2024-10-29 20:13:02 -07:00
|
|
|
|
2024-10-30 20:09:08 -07:00
|
|
|
programs.fish = lib.mkIf config.programs.fish.enable {
|
2024-10-29 20:13:02 -07:00
|
|
|
functions = {
|
|
|
|
cat = {
|
|
|
|
wraps = "bat";
|
2024-11-02 15:35:48 -07:00
|
|
|
body = # fish
|
|
|
|
"bat $argv";
|
2024-10-29 20:13:02 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
cath = {
|
|
|
|
wraps = "bat";
|
2024-11-02 15:35:48 -07:00
|
|
|
body = # fish
|
|
|
|
"bat --plain --language=help $argv";
|
2024-10-29 20:13:02 -07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
shellAbbrs = {
|
|
|
|
B = {
|
|
|
|
position = "anywhere";
|
|
|
|
setCursor = true;
|
2024-11-02 15:35:48 -07:00
|
|
|
expansion = # fish
|
|
|
|
"% | bat";
|
2024-10-29 20:13:02 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
"-h" = {
|
|
|
|
position = "anywhere";
|
2024-11-02 15:35:48 -07:00
|
|
|
expansion = # fish
|
|
|
|
"-h | cath";
|
2024-10-29 20:13:02 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
"--help" = {
|
|
|
|
position = "anywhere";
|
2024-11-02 15:35:48 -07:00
|
|
|
expansion = # fish
|
|
|
|
"--help | cath";
|
2024-10-29 20:13:02 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
help = {
|
|
|
|
position = "anywhere";
|
2024-11-02 15:35:48 -07:00
|
|
|
expansion = # fish
|
|
|
|
"help | cath";
|
2024-10-29 20:13:02 -07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-10-19 17:25:26 -07:00
|
|
|
}
|