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