Files
dotfiles/install.d/20-ssh.sh
Andrejus cccffa8fae 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>
2026-03-18 15:29:02 +00:00

30 lines
728 B
Bash
Executable File

#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Print SSH key.
#
# Skip in Codespaces (managed by GitHub)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_skip "Codespaces"; return 0; }
# Skip if explicitly disabled
[[ -n "$SKIP_SSH_CONFIG" ]] && { log_skip "SKIP_SSH_CONFIG is set"; return 0; }
ssh_method="ed25519"
ssh_target="${HOME}/.ssh"
ssh_key="${ssh_target}/id_${ssh_method}"
ssh_pub="${ssh_key}.pub"
if [ ! -f "$ssh_key" ]; then
ssh-keygen \
-t "$ssh_method" \
-f "$ssh_key" \
-C "$(whoami)@$(hostname)-$(date -I)"
fi
cat "$ssh_pub" | log_quote
unset ssh_method ssh_target ssh_key ssh_pub
log_pass "SSH key configured"