- Replace BLUE/CYAN/CYAN_BOLD with TEAL/TEAL_BOLD (#2CB494) to match the primary accent used across vim, zsh prompt, tmux, and fzf - Update BLUE (#0C48CC -> #4068D4) then merge into TEAL - Update RED (#F40404 -> #F88C14) to match vim/shell error orange - Rename GREEN to grey-blue (#7290B8) for [PASS] messages - Format all raw echo output with log functions or log_quote - Suppress sudo prompt when credentials are already cached - Add missing log_pass to 22-zsh.sh and 23-stow.sh - Convert raw 'already installed' echos to log_skip (7 scripts) - Pipe SSH key and mise output through log_quote - Suppress noisy bat cache and mise WARN output - Match fastfetch colors to palette (teal logo, grey-blue keys) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
55 lines
1.3 KiB
Bash
Executable File
55 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Description:
|
|
# Configure zsh shell with direct plugin management.
|
|
#
|
|
|
|
# install zsh
|
|
if ! command -v zsh &> /dev/null; then
|
|
case "$DOTS_PKG" in
|
|
apt)
|
|
sudo apt-get install -qq zsh
|
|
;;
|
|
pacman)
|
|
sudo pacman -S --noconfirm zsh
|
|
;;
|
|
brew)
|
|
brew install zsh
|
|
;;
|
|
*)
|
|
log_warn "Skipping zsh install: no supported package manager found"
|
|
return 0
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
zsh --version | log_quote
|
|
|
|
# plugin directory (XDG compliant)
|
|
PLUGIN_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/plugins"
|
|
mkdir -p "$PLUGIN_DIR"
|
|
|
|
# install zsh-autosuggestions
|
|
if [ ! -d "$PLUGIN_DIR/zsh-autosuggestions" ]; then
|
|
git clone -q \
|
|
https://github.com/zsh-users/zsh-autosuggestions.git \
|
|
"$PLUGIN_DIR/zsh-autosuggestions"
|
|
fi
|
|
|
|
# install zsh-syntax-highlighting
|
|
if [ ! -d "$PLUGIN_DIR/zsh-syntax-highlighting" ]; then
|
|
git clone -q \
|
|
https://github.com/zsh-users/zsh-syntax-highlighting.git \
|
|
"$PLUGIN_DIR/zsh-syntax-highlighting"
|
|
fi
|
|
|
|
# change default shell to zsh
|
|
if [[ "$SHELL" != *zsh ]]; then
|
|
sudo chsh -s "$(command -v zsh)" "$(whoami)"
|
|
sudo usermod -s "$(command -v zsh)" "$(whoami)"
|
|
fi
|
|
|
|
log_pass "zsh configured"
|
|
|