improve font install
This commit is contained in:
@@ -50,10 +50,20 @@ install_packages wget curl nano fastfetch lolcat bash-completion starship alacri
|
|||||||
|
|
||||||
# Optionally handle fonts
|
# Optionally handle fonts
|
||||||
FONT_DIR="$HOME/.local/share/fonts"
|
FONT_DIR="$HOME/.local/share/fonts"
|
||||||
mkdir -p "$FONT_DIR"
|
FONT_NAME="RobotoMonoNerdFont" # Changed name to reflect the installed files
|
||||||
curl -L "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/RobotoMono.zip" -o "/tmp/RobotoMono.zip"
|
FONT_ZIP="/tmp/RobotoMono.zip" # Use original ZIP name for download
|
||||||
unzip -oq "/tmp/RobotoMono.zip" -d "$FONT_DIR"
|
DOWNLOAD_NAME="RobotoMono"
|
||||||
fc-cache -fv
|
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
|
# Enable basic services
|
||||||
sudo systemctl enable chrony
|
sudo systemctl enable chrony
|
||||||
|
|||||||
Reference in New Issue
Block a user