feat: add bat, batman and delta to common shell commands
This commit is contained in:
parent
4c180c599d
commit
974a34fecb
3 changed files with 56 additions and 1 deletions
|
@ -1,9 +1,10 @@
|
|||
{ ... }: {
|
||||
{ pkgs, ... }: {
|
||||
programs = {
|
||||
fzf = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
};
|
||||
|
||||
ripgrep = {
|
||||
enable = true;
|
||||
arguments = [
|
||||
|
@ -16,7 +17,28 @@
|
|||
"path"
|
||||
];
|
||||
};
|
||||
|
||||
jq.enable = true;
|
||||
htop.enable = true;
|
||||
|
||||
bash.shellAliases = {
|
||||
cat = "bat ";
|
||||
man = "BAT_THEME='default' batman ";
|
||||
};
|
||||
bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "dracula-bat";
|
||||
};
|
||||
themes = {
|
||||
dracula-bat = {
|
||||
src = "${pkgs.dracula-theme}/bat";
|
||||
file = "dracula-bat.tmTheme";
|
||||
};
|
||||
};
|
||||
extraPackages = with pkgs.bat-extras; [
|
||||
batman
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -13,6 +13,25 @@
|
|||
includes = [
|
||||
{ path = "${pkgs.dracula-theme}/git-colors"; }
|
||||
];
|
||||
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
side-by-side = true;
|
||||
line-numbers-zero-style = "#E6EDF3"; #BD93F9";
|
||||
};
|
||||
};
|
||||
|
||||
# https://github.com/dandavison/delta/issues/630#issuecomment-860046929
|
||||
extraConfig.pager = let
|
||||
cmd = "LESS='LRc --mouse' ${pkgs.delta}/bin/delta";
|
||||
in {
|
||||
diff = cmd;
|
||||
show = cmd;
|
||||
stash = cmd;
|
||||
log = cmd;
|
||||
reflog = cmd;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,6 +15,13 @@
|
|||
hash = "sha256-3tKjKn5IHIByj+xgi2AIL1vZANlb0vlYJsPjH6BHGxM=";
|
||||
};
|
||||
|
||||
bat-theme = pkgs.fetchFromGitHub {
|
||||
owner = "matt1432";
|
||||
repo = "bat";
|
||||
rev = "270bce892537311ac92494a2a7663e3ecf772092";
|
||||
hash = "sha256-UyZ3WFfrEEBjtdb//5waVItmjKorkOiNGtu9eeB3lOw=";
|
||||
};
|
||||
|
||||
wallpaper = pkgs.fetchurl {
|
||||
url = "https://github.com/aynp/dracula-wallpapers/blob/main/Art/4k/Waves%201.png?raw=true";
|
||||
hash = "sha256-f9FwSOSvqTeDj4bOjYUQ6TM+/carCD9o5dhg/MnP/lk=";
|
||||
|
@ -43,6 +50,13 @@ in {
|
|||
mkdir -p $out
|
||||
cp -a ./git-colors $out
|
||||
|
||||
# Bat colors
|
||||
mkdir -p ./bat $out/bat
|
||||
cp -a ${bat-theme}/Dracula.tmTheme ./bat/dracula-bat.tmTheme
|
||||
chmod 777 ./bat/dracula-bat.tmTheme
|
||||
|
||||
cp -a ./bat/dracula-bat.tmTheme $out/bat
|
||||
|
||||
# Plymouth
|
||||
cp -a ${plymouth}/dracula ./dracula
|
||||
chmod 777 ./dracula
|
||||
|
|
Loading…
Reference in a new issue