-
Notifications
You must be signed in to change notification settings - Fork 92
/
Copy pathinstall_nerdfonts.sh
46 lines (38 loc) · 1.26 KB
/
install_nerdfonts.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
# Helper script to install nerd-fonts on Ubuntu.
REPO="ryanoasis/nerd-fonts"
latest_release() {
local repo=$1
local result=$(curl --silent "https://api.github.com/repos/$repo/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')
echo "$result"
}
echo "==> Fetching latest release version of $REPO"
version=$(latest_release $REPO)
echo "==> Latest version is: $version"
RED='\033[0;31m'
NC='\033[0m' # No Color
install_font() {
local fontname=$1
# install DroidSansMono Nerd Font --> u can choose another at: https://www.nerdfonts.com/font-downloads
echo -e "==> Downloading font ${RED}$fontname${NC} ......"
echo "==> https://github.com/$REPO/releases/download/$version/$fontname.zip"
wget https://github.com/$REPO/releases/download/$version/$fontname.zip
unzip $fontname.zip -d ~/.fonts
fc-cache -fv
echo "==> done!"
}
# install_font FiraCode
# install_font Iosevka
# install_font FantasqueSansMono
# install_font Lekton
# install_font Inconsolata
# install_font VictorMono
# install_font InconsolataGo
# install_font Monofur
# install_font JetBrainsMono
# install_font CascadiaCode
# install_font SourceCodePro
# install_font Monaspace
# install_font IosevkaTermSlab Nerd Font
# install_font MesloLG Nerd Font
install_font AnonymousPro