bin: add script for installing bat theme

This commit is contained in:
Smirnov Oleksandr 2024-06-24 13:14:59 +03:00
parent 1d343192ac
commit 6ef6c4e8ea

12
bin/bat-install-theme Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
tmDir="$(bat --config-dir)/themes"
mkdir -p "$tmDir"
curl -O https://raw.githubusercontent.com/folke/tokyonight.nvim/main/extras/sublime/tokyonight_night.tmTheme -o "$tmDir"/tokyonight_night.tmTheme
bat cache --build
read -p $'\e[32mDo you want to set the theme to tokyonight_night?\e[0m [y/N]:' -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo '--theme="tokyonight_night"' >> "$(bat --config-dir)/config"
fi