Skip to content

Instantly share code, notes, and snippets.

@m-rey
Created April 15, 2021 07:42
Show Gist options
  • Save m-rey/0735b5ffea17d423ac5505aba991d684 to your computer and use it in GitHub Desktop.
Save m-rey/0735b5ffea17d423ac5505aba991d684 to your computer and use it in GitHub Desktop.
Install Fura Code (Fira Code Nerd Font). Adapted from https://github.com/tonsky/FiraCode/wiki/Linux-instructions#manual-installation
#!/bin/bash
fonts_dir="${HOME}/.local/share/fonts"
if [ ! -d "${fonts_dir}" ]; then
echo "mkdir -p $fonts_dir"
mkdir -p "${fonts_dir}"
else
echo "Found fonts dir $fonts_dir"
fi
for type in Bold Light Medium Regular Retina SemiBold; do
file_path="${HOME}/.local/share/fonts/FiraCode-${type}-NerdFont.ttf"
file_url="https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/FiraCode/${type}/complete/Fira%20Code%20${type}%20Nerd%20Font%20Complete.ttf?raw=true"
if [ ! -s "${file_path}" ]; then
echo "wget -O $file_path $file_url"
wget -O "${file_path}" "${file_url}"
else
echo "Found existing file $file_path"
fi;
done
echo "fc-cache -f"
fc-cache -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment