1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-21 11:01:31 +01:00

zsh: add support for THEME_PREFER_LIGHT env variable for bat theme

This commit is contained in:
bretello 2023-09-14 22:42:04 +02:00
parent 0c52f21233
commit 5a1c3c07ac
Signed by: brethil
GPG Key ID: 876AAC6290170FE7

View File

@ -81,7 +81,11 @@ if [[ "$(command -v bat)" || "$(command -v batcat)" ]]; then
alias cat=batcat
export PAGER=batcat
fi
export BAT_THEME="gruvbox-dark"
if [[ -n $THEME_PREFER_LIGHT ]]; then
export BAT_THEME="gruvbox-light"
else
export BAT_THEME="gruvbox-dark"
fi
export BAT_PAGER="less $LESS"
export PAGER=bat