initial commit
This commit is contained in:
27
install/fonts.sh
Executable file
27
install/fonts.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "==> Installing fonts..."
|
||||
|
||||
FONTS_DIR="$HOME/.local/share/fonts"
|
||||
mkdir -p "$FONTS_DIR"
|
||||
|
||||
# FiraCode Nerd Font (includes FiraMono Nerd Font Mono)
|
||||
FIRA_VERSION="3.3.0"
|
||||
FIRA_ZIP="FiraCode.zip"
|
||||
FIRA_URL="https://github.com/ryanoasis/nerd-fonts/releases/download/v${FIRA_VERSION}/${FIRA_ZIP}"
|
||||
|
||||
if fc-list | grep -qi "FiraCode Nerd Font"; then
|
||||
echo " FiraCode Nerd Font already installed, skipping"
|
||||
else
|
||||
echo " downloading FiraCode Nerd Font v${FIRA_VERSION}..."
|
||||
TMP_DIR=$(mktemp -d)
|
||||
curl -fsSL "$FIRA_URL" -o "$TMP_DIR/$FIRA_ZIP"
|
||||
unzip -q "$TMP_DIR/$FIRA_ZIP" -d "$TMP_DIR/fira"
|
||||
cp "$TMP_DIR"/fira/*.ttf "$FONTS_DIR/"
|
||||
rm -rf "$TMP_DIR"
|
||||
fc-cache -f "$FONTS_DIR"
|
||||
echo " FiraCode Nerd Font installed"
|
||||
fi
|
||||
|
||||
echo "==> Fonts done."
|
||||
Reference in New Issue
Block a user