Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -56,6 +56,8 @@ let g:netrw_browse_split = 4
|
||||
set background=dark
|
||||
|
||||
if has('termguicolors') && ($COLORTERM ==# 'truecolor' || $COLORTERM ==# '24bit')
|
||||
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||
set termguicolors
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# Profiling: ZSH_BENCH=1 zsh
|
||||
[[ -n "$ZSH_BENCH" ]] && zmodload zsh/zprof
|
||||
|
||||
# Upgrade xterm-color to xterm-256color (gh cs ssh sets the weaker value)
|
||||
[[ "$TERM" == "xterm-color" ]] && export TERM=xterm-256color
|
||||
|
||||
# Assume truecolor support if terminal advertises 256color (covers SSH, tmux)
|
||||
[[ -z "$COLORTERM" && "$TERM" == *256color* ]] && export COLORTERM=truecolor
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
log_info "Environment: DOTS_OS=$DOTS_OS, DOTS_PKG=$DOTS_PKG, DOTS_ENV=$DOTS_ENV"
|
||||
|
||||
if [[ "$DOTS_OS" == "macos" ]]; then
|
||||
sw_vers
|
||||
sw_vers 2>&1 | log_quote
|
||||
elif [[ "$DOTS_OS" == "linux" ]]; then
|
||||
if [[ -r /etc/os-release ]]; then
|
||||
cat /etc/os-release
|
||||
log_quote < /etc/os-release
|
||||
fi
|
||||
|
||||
if [[ -z "$DOTS_PKG" ]]; then
|
||||
|
||||
@@ -15,5 +15,5 @@ if ! command -v brew &> /dev/null; then
|
||||
else
|
||||
echo "Homebrew is already installed."
|
||||
fi
|
||||
brew --version
|
||||
brew --version | log_quote
|
||||
log_pass "Homebrew installed"
|
||||
|
||||
@@ -17,10 +17,17 @@ apt_packages=(
|
||||
wget
|
||||
)
|
||||
|
||||
# Skip if all packages already installed
|
||||
if dpkg -s "${apt_packages[@]}" &>/dev/null; then
|
||||
apt --version | log_quote
|
||||
return 0
|
||||
fi
|
||||
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -qq "${apt_packages[@]}"
|
||||
|
||||
unset apt_packages
|
||||
|
||||
apt --version
|
||||
apt --version | log_quote
|
||||
log_pass "apt packages installed"
|
||||
|
||||
|
||||
@@ -30,6 +30,6 @@ if ! command -v yay &>/dev/null; then
|
||||
rm -rf /tmp/yay
|
||||
fi
|
||||
|
||||
pacman --version
|
||||
yay --version
|
||||
pacman --version | log_quote
|
||||
yay --version | log_quote
|
||||
log_pass "pacman packages installed"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
# Skip in Codespaces (pre-installed in universal image)
|
||||
[[ "$DOTS_ENV" == "codespaces" ]] && { log_skip "Codespaces"; git --version; return 0; }
|
||||
[[ "$DOTS_ENV" == "codespaces" ]] && { git --version | log_quote; return 0; }
|
||||
|
||||
if ! command -v git &> /dev/null; then
|
||||
case "$DOTS_PKG" in
|
||||
@@ -26,5 +26,5 @@ if ! command -v git &> /dev/null; then
|
||||
esac
|
||||
fi
|
||||
|
||||
git --version
|
||||
git --version | log_quote
|
||||
log_pass "git configured"
|
||||
|
||||
@@ -24,7 +24,7 @@ if ! command -v zsh &> /dev/null; then
|
||||
esac
|
||||
fi
|
||||
|
||||
zsh --version
|
||||
zsh --version | log_quote
|
||||
|
||||
# plugin directory (XDG compliant)
|
||||
PLUGIN_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/plugins"
|
||||
@@ -50,4 +50,3 @@ if [[ "$SHELL" != *zsh ]]; then
|
||||
sudo usermod -s "$(command -v zsh)" "$(whoami)"
|
||||
fi
|
||||
|
||||
log_pass "zsh configured"
|
||||
|
||||
@@ -23,7 +23,7 @@ if ! command -v stow &> /dev/null; then
|
||||
esac
|
||||
fi
|
||||
|
||||
stow --version
|
||||
stow --version | log_quote
|
||||
|
||||
root_dir=${DOTFILES:-$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")}
|
||||
|
||||
@@ -43,4 +43,3 @@ stow --dir="$root_dir" --target="$HOME" home
|
||||
# Bust PATH cache to force regeneration with new profile
|
||||
rm -f "${XDG_CACHE_HOME:-$HOME/.cache}/dots/path"
|
||||
|
||||
log_pass "stow linked"
|
||||
|
||||
@@ -23,5 +23,5 @@ if ! command -v tmux &> /dev/null; then
|
||||
esac
|
||||
fi
|
||||
|
||||
tmux -V
|
||||
log_pass "tmux installed"
|
||||
tmux -V | log_quote
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ if ! command -v mise &>/dev/null; then
|
||||
;;
|
||||
apt)
|
||||
# https://mise.jdx.dev/getting-started.html#apt-debian-ubuntu
|
||||
sudo install -dm 755 /etc/apt/keyrings
|
||||
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | \
|
||||
sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null
|
||||
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=amd64] https://mise.jdx.dev/deb stable main" | \
|
||||
@@ -35,7 +36,7 @@ if ! command -v mise &>/dev/null; then
|
||||
esac
|
||||
fi
|
||||
|
||||
mise --version
|
||||
echo "mise $(mise --version)" | log_quote
|
||||
|
||||
# Skip runtimes in Codespaces (use pre-installed versions)
|
||||
if [[ "$DOTS_ENV" != "codespaces" ]]; then
|
||||
@@ -73,7 +74,6 @@ if [[ "$DOTS_ENV" != "codespaces" ]]; then
|
||||
fi
|
||||
|
||||
log_info "Installing apps..."
|
||||
mise install "${MISE_APPS[@]}"
|
||||
for tool in "${MISE_APPS[@]}"; do
|
||||
mise use -g "$tool"
|
||||
done
|
||||
@@ -89,6 +89,7 @@ fi
|
||||
|
||||
# Verify installations
|
||||
log_info "Verifying installations..."
|
||||
{
|
||||
if [[ "$DOTS_ENV" != "codespaces" ]]; then
|
||||
mise exec -- python --version
|
||||
mise exec -- poetry --version
|
||||
@@ -99,8 +100,9 @@ if [[ "$DOTS_ENV" != "codespaces" ]]; then
|
||||
echo "firebase: $(mise exec -- firebase --version)"
|
||||
echo "fastfetch: $(mise exec -- fastfetch --version 2>&1 | head -1)"
|
||||
fi
|
||||
fzf --version
|
||||
echo "fzf $(fzf --version)"
|
||||
zoxide --version
|
||||
rg --version | head -1
|
||||
delta --version | head -1
|
||||
} | log_quote
|
||||
log_pass "mise tools installed"
|
||||
|
||||
@@ -56,5 +56,5 @@ if ! groups "$USER" | grep -q "\b$docker_group\b"; then
|
||||
sudo usermod -aG docker "$USER"
|
||||
fi
|
||||
|
||||
docker --version
|
||||
docker --version | log_quote
|
||||
log_pass "Docker configured"
|
||||
|
||||
@@ -26,5 +26,5 @@ if ! command -v az &>/dev/null; then
|
||||
esac
|
||||
fi
|
||||
|
||||
az --version
|
||||
az --version | log_quote
|
||||
log_pass "Azure CLI installed"
|
||||
|
||||
@@ -31,5 +31,5 @@ if ! command -v redis-cli &>/dev/null; then
|
||||
esac
|
||||
fi
|
||||
|
||||
redis-cli --version
|
||||
redis-cli --version | log_quote
|
||||
log_pass "Redis installed"
|
||||
|
||||
@@ -32,9 +32,10 @@ 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_quote() { sed "s/^/ ${GREY}│ /" | sed "s/$/${NC}/"; }
|
||||
|
||||
# Export log functions
|
||||
export -f log_info log_pass log_skip log_warn log_error log_debug
|
||||
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 "\t${GREY}==============${NC}\n\n"
|
||||
|
||||
Reference in New Issue
Block a user