zsh: add support for THEME_PREFER_LIGHT env variable for bat theme

fix-ci
bretello 2023-09-14 22:42:04 +02:00
parent 0c52f21233
commit 5a1c3c07ac
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
1 changed files with 5 additions and 1 deletions

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