Created
October 23, 2022 20:56
-
-
Save alex-red/98ac74a616207ab4c364cbb8a92fd2b0 to your computer and use it in GitHub Desktop.
install nerdfonts on ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
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