From 28ebac465d6a52b35966ea249edd0d8adeeae69c Mon Sep 17 00:00:00 2001 From: Stefan Herold <794372+Blackjacx@users.noreply.github.com> Date: Sun, 12 Nov 2023 18:39:11 +0100 Subject: [PATCH] Install fzf-tab plugin via bootstrap script --- bootstrap/bootstrap.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/bootstrap/bootstrap.sh b/bootstrap/bootstrap.sh index 8b2bf75..5a93bcd 100755 --- a/bootstrap/bootstrap.sh +++ b/bootstrap/bootstrap.sh @@ -221,15 +221,21 @@ configureSoftware() { printf "#################################################################\n\n" command -v bat >/dev/null 2>&1 && { + printf "Install Catppuccin for Bat\n" - printf "Install Catppuccin for Bat\n" - - git clone git@github.com:catppuccin/bat.git /tmp/catppuccin-for-bat + tmp=$(mktemp -d) + git clone git@github.com:catppuccin/bat.git "$tmp" mkdir -p "$(bat --config-dir)/themes" - cp /tmp/catppuccin-for-bat/*.tmTheme "$(bat --config-dir)/themes" + cp "$tmp/*.tmTheme" "$(bat --config-dir)/themes" bat cache --build printf 'Preview themes using `bat --list-themes | fzf --preview="bat --theme={} --color=always "`\n' - } + } + + fzf_tab_dir="${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab" + if [ ! -d "${HOME}/.oh-my-zsh" ]; then + printf "Install `fzf-tab` ZSH plugin\n" + git clone https://github.com/Aloxaf/fzf-tab "$fzf_tab_dir" + fi } #