Restore bat color-setting
parent
1e52b3a360
commit
0a206737ad
|
@ -204,7 +204,7 @@
|
||||||
# Other
|
# Other
|
||||||
".." = "cd ..";
|
".." = "cd ..";
|
||||||
":q" = "exit";
|
":q" = "exit";
|
||||||
cat = "${bat}/bin/bat --style=plain";
|
cat = "${bat}/bin/bat --style=plain --paging=never";
|
||||||
du = "${du-dust}/bin/dust";
|
du = "${du-dust}/bin/dust";
|
||||||
g = "${gitAndTools.git}/bin/git";
|
g = "${gitAndTools.git}/bin/git";
|
||||||
ls = "${exa}/bin/exa";
|
ls = "${exa}/bin/exa";
|
||||||
|
|
|
@ -17,9 +17,27 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
style = "auto";
|
style = "auto";
|
||||||
theme = "base16-256";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# See `./shells.nix` for more on how this is used.
|
||||||
|
fish = {
|
||||||
|
functions = {
|
||||||
|
set-bat-colors = {
|
||||||
|
body = ''
|
||||||
|
if test "$term_background" = light
|
||||||
|
set -xg BAT_THEME "Monokai Extended Light"
|
||||||
|
else
|
||||||
|
set -xg BAT_THEME "TwoDark"
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
onVariable = "term_background";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
interactiveShellInit = ''
|
||||||
|
# Set `bat` colors based on value of `$term_backdround` when shell starts up.
|
||||||
|
set-bat-colors
|
||||||
|
'';
|
||||||
|
};
|
||||||
# Direnv, load and unload environment variables depending on the current directory.
|
# Direnv, load and unload environment variables depending on the current directory.
|
||||||
# https://direnv.net
|
# https://direnv.net
|
||||||
# https://rycee.gitlab.io/home-manager/options.html#opt-programs.direnv.enable
|
# https://rycee.gitlab.io/home-manager/options.html#opt-programs.direnv.enable
|
||||||
|
|
Loading…
Reference in New Issue