From 6ced4625ad413d23b34af6ba32a37c39eedfb0fa Mon Sep 17 00:00:00 2001 From: anthonyp-cns <75483753+anthonyp-cns@users.noreply.github.com> Date: Sun, 7 Jul 2024 17:10:52 -0600 Subject: [PATCH] Added font in dependency function --- setup.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/setup.sh b/setup.sh index 0b93242..4cd06e1 100755 --- a/setup.sh +++ b/setup.sh @@ -98,6 +98,25 @@ installDepend() { if ! command_exists nvim; then DEPENDENCIES="${DEPENDENCIES} neovim" fi + # Check to see if a the FiraCode Nerd Font is installed (Change this to whatever font you would like) + FONT_NAME="FiraCode Nerd Font" + if fc-list :family | grep -iq "$FONT_NAME"; then + echo "Font '$FONT_NAME' is installed." + else + echo "Installing font '$FONT_NAME'" + # Change this URL to correspond with the correct font + FONT_URL="https://github.com/ryanoasis/nerd-fonts/releases/download/v2.3.3/FiraCode.zip" + FONT_DIR="$HOME/.local/share/fonts" + wget $FONT_URL -O ${FONT_NAME}.zip + unzip ${FONT_NAME}.zip -d $FONT_NAME + mkdir -p $FONT_DIR + mv ${FONT_NAME}/*.ttf $FONT_DIR/ + # Update the font cache + fc-cache -fv + # delete the files created from this + rm -rf ${FONT_NAME} ${FONT_NAME}.zip + echo "'$FONT_NAME' installed successfully." + fi echo -e "${YELLOW}Installing dependencies...${RC}" if [[ $PACKAGER == "pacman" ]]; then