Unify installer colors with vim/shell palette and clean up output
- 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>
This commit is contained in:
@@ -9,11 +9,11 @@
|
||||
[[ "$DOTS_OS" != "macos" ]] && { log_skip "Not macOS"; return 0; }
|
||||
|
||||
if ! command -v brew &> /dev/null; then
|
||||
echo "Installing Homebrew..."
|
||||
log_info "Installing Homebrew..."
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
else
|
||||
echo "Homebrew is already installed."
|
||||
log_skip "Homebrew already installed"
|
||||
fi
|
||||
brew --version | log_quote
|
||||
log_pass "Homebrew installed"
|
||||
|
||||
@@ -23,7 +23,7 @@ if [ ! -f "$ssh_key" ]; then
|
||||
-C "$(whoami)@$(hostname)-$(date -I)"
|
||||
fi
|
||||
|
||||
cat "$ssh_pub"
|
||||
cat "$ssh_pub" | log_quote
|
||||
|
||||
unset ssh_method ssh_target ssh_key ssh_pub
|
||||
log_pass "SSH key configured"
|
||||
|
||||
@@ -50,3 +50,5 @@ if [[ "$SHELL" != *zsh ]]; then
|
||||
sudo usermod -s "$(command -v zsh)" "$(whoami)"
|
||||
fi
|
||||
|
||||
log_pass "zsh configured"
|
||||
|
||||
|
||||
@@ -49,3 +49,5 @@ fi
|
||||
# Bust PATH cache to force rebuild with new profile
|
||||
rm -f "${XDG_CACHE_HOME:-$HOME/.cache}/dots/path"
|
||||
|
||||
log_pass "stow linked"
|
||||
|
||||
|
||||
@@ -29,5 +29,5 @@ fi
|
||||
|
||||
bat --version | log_quote
|
||||
|
||||
bat cache --build 2>/dev/null
|
||||
bat cache --build &>/dev/null
|
||||
log_pass "bat theme cache built"
|
||||
|
||||
@@ -36,7 +36,7 @@ if ! command -v mise &>/dev/null; then
|
||||
esac
|
||||
fi
|
||||
|
||||
echo "mise $(mise --version)" | log_quote
|
||||
echo "mise $(MISE_QUIET=1 mise --version)" | log_quote
|
||||
|
||||
# Skip runtimes in Codespaces (use pre-installed versions)
|
||||
if [[ "$DOTS_ENV" != "codespaces" ]]; then
|
||||
@@ -46,9 +46,9 @@ if [[ "$DOTS_ENV" != "codespaces" ]]; then
|
||||
)
|
||||
|
||||
log_info "Installing runtimes..."
|
||||
mise install "${MISE_RUNTIMES[@]}"
|
||||
MISE_QUIET=1 mise install "${MISE_RUNTIMES[@]}" 2>&1 | log_quote
|
||||
for tool in "${MISE_RUNTIMES[@]}"; do
|
||||
mise use -g "$tool"
|
||||
MISE_QUIET=1 mise use -g "$tool" 2>&1 | log_quote
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -76,11 +76,11 @@ fi
|
||||
|
||||
log_info "Installing apps..."
|
||||
for tool in "${MISE_APPS[@]}"; do
|
||||
mise use -g "$tool"
|
||||
MISE_QUIET=1 mise use -g "$tool" 2>&1 | log_quote
|
||||
done
|
||||
|
||||
# Rebuild bat theme cache with mise-installed bat (must match delta's syntect version)
|
||||
bat cache --build 2>/dev/null
|
||||
bat cache --build &>/dev/null
|
||||
|
||||
if [[ "$DOTS_ENV" != "codespaces" ]]; then
|
||||
# Setup Poetry ZSH completions (XDG compliant)
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
if ! echo "$BREW_CASKS" | grep -q "^colour-contrast-analyser$"; then
|
||||
brew install --cask colour-contrast-analyser
|
||||
else
|
||||
echo "Colour Contrast Analyser (CCA) is already installed."
|
||||
log_skip "CCA already installed"
|
||||
fi
|
||||
log_pass "CCA installed"
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
if ! echo "$BREW_CASKS" | grep -q "^rectangle$"; then
|
||||
brew install --cask rectangle
|
||||
else
|
||||
echo "Rectangle is already installed."
|
||||
log_skip "Rectangle already installed"
|
||||
fi
|
||||
log_pass "Rectangle installed"
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
if ! echo "$BREW_CASKS" | grep -q "^meetingbar$"; then
|
||||
brew install --cask meetingbar
|
||||
else
|
||||
echo "MeetingBar is already installed."
|
||||
log_skip "MeetingBar already installed"
|
||||
fi
|
||||
log_pass "MeetingBar installed"
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
if ! echo "$BREW_CASKS" | grep -q "^betterdisplay$"; then
|
||||
brew install --cask betterdisplay
|
||||
else
|
||||
echo "BetterDisplay is already installed."
|
||||
log_skip "BetterDisplay already installed"
|
||||
fi
|
||||
log_pass "BetterDisplay installed"
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
if ! echo "$BREW_FORMULAE" | grep -q "^dockutil$"; then
|
||||
brew install dockutil
|
||||
else
|
||||
echo "dockutil is already installed."
|
||||
log_skip "dockutil already installed"
|
||||
fi
|
||||
log_pass "dockutil installed"
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
if ! echo "$BREW_CASKS" | grep -q "^wispr-flow$"; then
|
||||
brew install --cask wispr-flow
|
||||
else
|
||||
echo "Wispr Flow is already installed."
|
||||
log_skip "Wispr Flow already installed"
|
||||
fi
|
||||
log_pass "Wispr Flow installed"
|
||||
|
||||
@@ -8,5 +8,9 @@
|
||||
# Skip in Codespaces (cosmetic only)
|
||||
[[ "$DOTS_ENV" == "codespaces" ]] && { log_skip "Codespaces"; return 0; }
|
||||
|
||||
fastfetch --pipe false
|
||||
fastfetch --pipe false \
|
||||
--logo-color-1 "38;2;44;180;148" \
|
||||
--color-title "38;2;44;180;148" \
|
||||
--color-keys "38;2;114;144;184" \
|
||||
--color-separator "38;2;128;128;128"
|
||||
|
||||
|
||||
@@ -6,18 +6,16 @@ set -eo pipefail
|
||||
#
|
||||
|
||||
if [[ -t 1 && -n "$TERM" && "$TERM" != "dumb" ]]; then
|
||||
BLUE=$'\033[38;2;12;72;204m'
|
||||
CYAN=$'\033[38;2;0;228;252m'
|
||||
CYAN_BOLD=$'\033[1;38;2;0;228;252m'
|
||||
RED=$'\033[38;2;244;4;4m'
|
||||
GREEN=$'\033[38;2;44;180;148m'
|
||||
TEAL=$'\033[38;2;44;180;148m'
|
||||
TEAL_BOLD=$'\033[1;38;2;44;180;148m'
|
||||
RED=$'\033[38;2;248;140;20m'
|
||||
GREEN=$'\033[38;2;114;144;184m'
|
||||
YELLOW=$'\033[38;2;252;252;56m'
|
||||
GREY=$'\033[38;2;128;128;128m'
|
||||
NC=$'\033[0m'
|
||||
else
|
||||
BLUE=""
|
||||
CYAN=""
|
||||
CYAN_BOLD=""
|
||||
TEAL=""
|
||||
TEAL_BOLD=""
|
||||
RED=""
|
||||
GREEN=""
|
||||
YELLOW=""
|
||||
@@ -26,18 +24,18 @@ else
|
||||
fi
|
||||
|
||||
# Log functions
|
||||
log_info() { echo -e "${BLUE}[INFO]${NC} $*"; }
|
||||
log_info() { echo -e "${TEAL}[INFO]${NC} $*"; }
|
||||
log_pass() { echo -e "${GREEN}[PASS]${NC} $*"; }
|
||||
log_skip() { echo -e "${GREY}[SKIP]${NC} $*"; }
|
||||
log_warn() { echo -e "${YELLOW}[WARN]${NC} $*"; }
|
||||
log_error() { echo -e "${RED}[FAIL]${NC} $*"; }
|
||||
log_debug() { echo -e "${CYAN}$*${NC}"; }
|
||||
log_debug() { echo -e "${TEAL}$*${NC}"; }
|
||||
log_quote() { sed "s/^/ ${GREY}│ /" | sed "s/$/${NC}/"; }
|
||||
|
||||
# Export log functions
|
||||
export -f log_info log_pass log_skip log_warn log_error log_debug log_quote
|
||||
|
||||
printf "\n\t${CYAN} <<< ${CYAN_BOLD}dots${CYAN} >>> ${NC}\n"
|
||||
printf "\n\t${TEAL} <<< ${TEAL_BOLD}dots${TEAL} >>> ${NC}\n"
|
||||
printf "\t${GREY}==============${NC}\n\n"
|
||||
|
||||
# High-resolution time helpers
|
||||
@@ -55,8 +53,10 @@ fi
|
||||
|
||||
# Ensure sudo credentials are cached
|
||||
if [[ -z "$SKIP_SUDO_CHECK" ]]; then
|
||||
echo -e "${YELLOW}Checking sudo credentials...${NC}"
|
||||
sudo -v
|
||||
if ! sudo -n true 2>/dev/null; then
|
||||
log_warn "Requesting sudo authentication..."
|
||||
sudo -v
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set up environment
|
||||
@@ -127,13 +127,15 @@ targets=($@)
|
||||
|
||||
# Run install scripts
|
||||
run() {
|
||||
echo -e "Running \"$(basename "$0")\" at \"$(date)\""
|
||||
echo -e "Running as \"$(whoami)\" on \"$(hostname)\""
|
||||
if [[ -n "$targets" ]]; then
|
||||
echo -e "Running ${YELLOW}${#targets[@]}${NC} install target(s): ${YELLOW}${targets[@]}${NC}"
|
||||
else
|
||||
echo -e "Running all install targets"
|
||||
fi
|
||||
{
|
||||
echo "Running \"$(basename "$0")\" at \"$(date)\""
|
||||
echo "Running as \"$(whoami)\" on \"$(hostname)\""
|
||||
if [[ -n "$targets" ]]; then
|
||||
echo "Running ${#targets[@]} install target(s): ${targets[*]}"
|
||||
else
|
||||
echo "Running all install targets"
|
||||
fi
|
||||
} | log_quote
|
||||
|
||||
scripts=("$install_dir"/*.sh)
|
||||
for script in "${scripts[@]}"; do
|
||||
@@ -147,7 +149,7 @@ run() {
|
||||
|
||||
local script_name=$(basename "$script")
|
||||
|
||||
printf "\n\n${CYAN}<<< ${CYAN_BOLD}$script_name:${NC}\n"
|
||||
printf "\n\n${TEAL}<<< ${TEAL_BOLD}$script_name:${NC}\n"
|
||||
local start_ns=$(now_ns)
|
||||
source "$script"
|
||||
local end_ns=$(now_ns)
|
||||
@@ -161,11 +163,11 @@ run() {
|
||||
else
|
||||
time_color="$RED"
|
||||
fi
|
||||
printf "${CYAN}>>> ${CYAN_BOLD}${script_name}, ${NC}"
|
||||
printf "${TEAL}>>> ${TEAL_BOLD}${script_name}, ${NC}"
|
||||
printf "completed in ${time_color}${execution_ms_formatted}ms${NC}\n"
|
||||
done
|
||||
}
|
||||
echo -e "\ninstall: Logging to \"$log_abs_target\""
|
||||
echo -e "\n${GREY}Logging to \"$log_abs_target\"${NC}"
|
||||
total_start_ns=$(now_ns)
|
||||
run 2>&1 | tee "$log_abs_target"
|
||||
total_end_ns=$(now_ns)
|
||||
@@ -173,5 +175,5 @@ total_end_ns=$(now_ns)
|
||||
total_ms=$(( (total_end_ns - total_start_ns) / 1000000 ))
|
||||
total_s=$(( total_ms / 1000 ))
|
||||
total_ms_rem=$(( total_ms % 1000 ))
|
||||
echo -e "\nThank you!"
|
||||
printf "\n${TEAL}Thank you!${NC}\n"
|
||||
printf "Total time: ${GREEN}%d.%03ds${NC}\n\n" "$total_s" "$total_ms_rem"
|
||||
|
||||
Reference in New Issue
Block a user