improve font install

This commit is contained in:
[yuri]
2025-11-11 15:13:05 +01:00
parent ce8a01f6e2
commit f9311db08a

View File

@@ -50,10 +50,20 @@ install_packages wget curl nano fastfetch lolcat bash-completion starship alacri
# Optionally handle fonts
FONT_DIR="$HOME/.local/share/fonts"
mkdir -p "$FONT_DIR"
curl -L "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/RobotoMono.zip" -o "/tmp/RobotoMono.zip"
unzip -oq "/tmp/RobotoMono.zip" -d "$FONT_DIR"
fc-cache -fv
FONT_NAME="RobotoMonoNerdFont" # Changed name to reflect the installed files
FONT_ZIP="/tmp/RobotoMono.zip" # Use original ZIP name for download
DOWNLOAD_NAME="RobotoMono"
if ! find "$FONT_DIR" -name "${FONT_NAME}*.ttf" -print -quit 2>/dev/null; then
say_yellow "Installing ${DOWNLOAD_NAME} Nerd Font..."
mkdir -p "$FONT_DIR"
curl -L "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/${DOWNLOAD_NAME}.zip" -o "$FONT_ZIP"
unzip -oq "$FONT_ZIP" -d "$FONT_DIR"
fc-cache -fv
rm "$FONT_ZIP"
say_green "${DOWNLOAD_NAME} installed."
else
say_yellow "${DOWNLOAD_NAME} Nerd Font is already installed in $FONT_DIR. Skipping installation."
fi
# Enable basic services
sudo systemctl enable chrony