-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding zsh-autosuggestion plugin via bootstrap config
- Loading branch information
Showing
2 changed files
with
54 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -231,22 +231,37 @@ configureSoftware() { | |
printf "Configure Sotware\n" | ||
printf "#################################################################\n\n" | ||
|
||
command -v bat > /dev/null 2>&1 && { | ||
printf "Install Catppuccin for Bat\n" | ||
|
||
tmp=$(mktemp -d) | ||
git clone [email protected]:catppuccin/bat.git "$tmp" | ||
mkdir -p "$(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 <path to file>"`\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 | ||
command -v ls &>/dev/null && { | ||
log "Install 'Catppuccin' theme for Bat" | ||
|
||
local tmp="$(mktemp -d)" | ||
local config_dir="$(bat --config-dir)" | ||
git clone -v [email protected]:catppuccin/bat.git $tmp | ||
mkdir -p "$config_dir/themes" | ||
cp -f "${tmp}"/*.tmTheme "${config_dir}/themes/" && \ | ||
bat cache --build && \ | ||
log 'Preview themes using $ bat --list-themes | fzf --preview="bat --theme={} --color=always <path to file>"' | ||
} | ||
|
||
#----------------------------------------------------------------------------- | ||
# ZSH Plugins Platform Independent | ||
# e.g. no homebrew on Raspberry Pi | ||
#----------------------------------------------------------------------------- | ||
|
||
github_plugins=( | ||
"aloxaf/fzf-tab" | ||
"zsh-users/zsh-autosuggestions" | ||
) | ||
|
||
for plugin in "${github_plugins[@]}"; do | ||
plugin_name=$(echo $plugin | cut -d"/" -f2) | ||
plugin_dir="${ZSH_CUSTOM:-${HOME}/.oh-my-zsh/custom}/plugins/$plugin_name" | ||
|
||
if [[ ! -d $plugin_dir ]]; then | ||
log "Installing ZSH plugin '$plugin'" | ||
git clone "https://github.com/$plugin" "$plugin_dir" | ||
fi | ||
done | ||
} | ||
|
||
# | ||
|
@@ -258,7 +273,6 @@ installSoftware() { | |
printf "\n\n#################################################################\n" | ||
printf "Setting up ZSH with Oh-My-Zsh\n" | ||
printf "#################################################################\n\n" | ||
|
||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | ||
fi | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters