chore(bat): support dark mode

main
sudo pacman -Syu 2023-08-05 02:05:13 +07:00
parent c68bd373c6
commit 4c598afc47
2 changed files with 8 additions and 1 deletions

View File

@ -1,2 +1 @@
--theme="Catppuccin-mocha"
--style=plain

View File

@ -40,6 +40,14 @@ alias meo="make"
# https://github.com/charmbracelet/glow
alias gl="glow"
# https://github.com/sharkdp/bat
if [[ $(uname) == "Darwin" ]]; then
alias bat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo Catppuccin-mocha || echo Catppuccin-latte)"
else
# TODO: Support dark mode for more OS
alias bat="bat --theme=Catppuccin-mocha"
fi
# https://restic.readthedocs.io/en/latest/manual_rest.html
if command -v restic &>/dev/null; then
export RESTIC_PASSWORD_FILE=$HOME/.restic_password_file