Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added font in dependency function #67

Merged
merged 1 commit into from
Jul 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down