Merge pull request #26 from brianpooe/claude/cool-hopper-8vgG8

fix(install): install JetBrainsMono Nerd Font
This commit is contained in:
Brian Pooe 2026-06-11 17:28:37 +02:00 committed by GitHub
commit f75fb0aff3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 37 additions and 0 deletions

View file

@ -24,6 +24,7 @@ source "$SCRIPT_DIR/lib/common.sh"
source "$SCRIPT_DIR/lib/packages.sh"
source "$SCRIPT_DIR/lib/brew.sh"
source "$SCRIPT_DIR/lib/extras.sh"
source "$SCRIPT_DIR/lib/fonts.sh"
source "$SCRIPT_DIR/lib/dotfiles.sh"
usage() {
@ -55,6 +56,7 @@ main() {
install_all_packages
install_brew_packages
install_all_extras
install_nerd_font
;;
dotfiles)
link_dotfiles
@ -66,6 +68,7 @@ main() {
install_all_packages
install_brew_packages
install_all_extras
install_nerd_font
link_dotfiles
set_zsh_as_shell
;;

31
install/lib/fonts.sh Normal file
View file

@ -0,0 +1,31 @@
#!/bin/bash
# Nerd Fonts — the configs (wezterm, starship, eza icons) assume
# "JetBrainsMono Nerd Font". Ubuntu's fonts-jetbrains-mono is the plain
# family without the Nerd glyphs, so install from the official release
# into ~/.local/share/fonts.
NERD_FONT_NAME="JetBrainsMono"
NERD_FONT_DIR="$HOME/.local/share/fonts/${NERD_FONT_NAME}NerdFont"
install_nerd_font() {
if fc-list 2>/dev/null | grep -qi "JetBrainsMono Nerd Font"; then
info "JetBrainsMono Nerd Font already installed"
return
fi
info "Installing ${NERD_FONT_NAME} Nerd Font..."
local url="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/${NERD_FONT_NAME}.tar.xz"
local tmp
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' RETURN
if ! curl -fsSL --retry 3 -o "$tmp/font.tar.xz" "$url"; then
warn "Nerd Font download failed; install manually from https://www.nerdfonts.com"
return
fi
mkdir -p "$NERD_FONT_DIR"
tar -xJf "$tmp/font.tar.xz" -C "$NERD_FONT_DIR"
fc-cache -f "$NERD_FONT_DIR"
info "Installed to $NERD_FONT_DIR"
}

View file

@ -20,6 +20,9 @@ APT_PACKAGES=(
# Wayland clipboard (Pop!_OS Cosmic is Wayland-native)
wl-clipboard
# fc-cache / fc-list for the Nerd Font install (lib/fonts.sh)
fontconfig
)
install_apt_packages() {