From 6ef6c4e8eafc44bf7b156ebe4df02083b54473f4 Mon Sep 17 00:00:00 2001 From: Smirnov Oleksandr Date: Mon, 24 Jun 2024 13:14:59 +0300 Subject: [PATCH] bin: add script for installing bat theme --- bin/bat-install-theme | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 bin/bat-install-theme diff --git a/bin/bat-install-theme b/bin/bat-install-theme new file mode 100755 index 0000000..6c0984e --- /dev/null +++ b/bin/bat-install-theme @@ -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