1
0
Fork 0

Add Maple Mono NF font install to bootstrap

- Arch: paru -S maplemono-nf-cn (AUR package, installed via Chaotic-AUR)
- Debian: download MapleMono-NF.zip from subframe7536/Maple-font v7.9
  release, extract to ~/.local/share/fonts, run fc-cache
- Idempotent: skips if fc-list already shows Maple Mono NF
- Pinned to v7.9 (20.6MB); bump MAPLE_FONT_VERSION when upgrading

Also documented in README that the default Maple Mono NF in nvim
init.lua will Just Work on every box thanks to the bootstrap.
This commit is contained in:
Rain 2026-06-21 18:25:21 -04:00
parent 2f1477668b
commit e63ddca6ea

View file

@ -116,6 +116,40 @@ else
log "tpm already installed" log "tpm already installed"
fi fi
# --------------------------- Maple Mono NF font ----------------------------
# nvim init.lua references "Maple Mono NF". Install it so the default font works.
# Pin Maple-font version. Bump manually if a release breaks things.
MAPLE_FONT_VERSION="v7.9"
if fc-list 2>/dev/null | grep -qi "Maple Mono NF"; then
log "Maple Mono NF already installed"
else
{{ if eq .os_family "arch" -}}
log "installing maplemono-nf-cn from AUR (via paru)"
paru -S --needed --noconfirm maplemono-nf-cn
{{ else if eq .os_family "debian" -}}
log "downloading MapleMono-NF.zip from subframe7536/Maple-font $MAPLE_FONT_VERSION"
FONT_DIR="$USER_HOME/.local/share/fonts/maple-mono-nf"
mkdir -p "$FONT_DIR"
TMP_ZIP="$(mktemp /tmp/maple-font.XXXXXX.zip)"
if curl -fL --retry 3 \
"https://github.com/subframe7536/Maple-font/releases/download/${MAPLE_FONT_VERSION}/MapleMono-NF.zip" \
-o "$TMP_ZIP"; then
log "extracting font files"
unzip -q -o "$TMP_ZIP" -d "$FONT_DIR"
rm -f "$TMP_ZIP"
log "running fc-cache"
fc-cache -fv >/dev/null
else
log "WARNING: failed to download Maple Mono NF — nvim will warn about missing font"
log "manual install: https://github.com/subframe7536/Maple-font"
rm -f "$TMP_ZIP"
fi
{{ else -}}
log "WARNING: font install not configured for os_family={{ .os_family }}"
{{ end -}}
fi
# --------------------------- set zsh as default shell --------------------- # --------------------------- set zsh as default shell ---------------------
USER_SHELL="$(getent passwd "$(whoami)" | cut -d: -f7)" USER_SHELL="$(getent passwd "$(whoami)" | cut -d: -f7)"
if [[ "$USER_SHELL" != "$(command -v zsh)" ]]; then if [[ "$USER_SHELL" != "$(command -v zsh)" ]]; then