Skip to content

Instantly share code, notes, and snippets.

@hiAndrewQuinn
Last active January 29, 2023 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiAndrewQuinn/7d9f13254f975b71ded18ef6cfc89276 to your computer and use it in GitHub Desktop.
Save hiAndrewQuinn/7d9f13254f975b71ded18ef6cfc89276 to your computer and use it in GitHub Desktop.
@donovan's Nerd Fonts install script
#!/bin/bash
# Original post:
# https://gist.github.com/matthewjberger/7dd7e079f282f8138a9dc3b045ebefa0?permalink_comment_id=4005789#gistcomment-4005789
declare -a fonts=(
BitstreamVeraSansMono
CodeNewRoman
DroidSansMono
FiraCode
FiraMono
Go-Mono
Hack
Hermit
JetBrainsMono
Meslo
Noto
Overpass
ProggyClean
RobotoMono
SourceCodePro
SpaceMono
Ubuntu
UbuntuMono
)
version='2.1.0'
fonts_dir="${HOME}/.local/share/fonts"
if [[ ! -d "$fonts_dir" ]]; then
mkdir -p "$fonts_dir"
fi
for font in "${fonts[@]}"; do
zip_file="${font}.zip"
download_url="https://github.com/ryanoasis/nerd-fonts/releases/download/v${version}/${zip_file}"
echo "Downloading $download_url"
wget "$download_url"
unzip "$zip_file" -d "$fonts_dir"
rm "$zip_file"
done
find "$fonts_dir" -name '*Windows Compatible*' -delete
fc-cache -fv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment