-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_nerd_fonts.sh
More file actions
executable file
·48 lines (41 loc) · 961 Bytes
/
install_nerd_fonts.sh
File metadata and controls
executable file
·48 lines (41 loc) · 961 Bytes
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
47
48
#!/bin/bash
# From https://gist.github.com/matthewjberger/7dd7e079f282f8138a9dc3b045ebefa0?permalink_comment_id=4179773#gistcomment-4179773
#declare -a fonts=(
# BitstreamVeraSansMono
# CodeNewRoman
# DroidSansMono
# FiraCode
# FiraMono
# Go-Mono
# Hack
# Hermit
# JetBrainsMono
# Meslo
# Noto
# Overpass
# ProggyClean
# RobotoMono
# SourceCodePro
# SpaceMono
# Ubuntu
# UbuntuMono
#)
declare -a fonts=(
Hack
JetBrainsMono
)
version='3.2.1'
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