configs/install-stuff/install-fonts.bash

28 lines
1.3 KiB
Bash
Raw Normal View History

2024-03-22 13:03:26 -05:00
#!/usr/bin/env bash
command_exists() { type "$1" &>/dev/null; }
# on void i could totally install the nerd fonts via `xbps-install nerd-fonts-otf` but i am NOT installing an extra 1.45-ish GB of the rest of the nerd fonts along with it
# stock firacode is available via `font-firacode` though
2024-07-10 14:29:31 -05:00
mkdir -p ~/.local/share/fonts/firacode
2024-03-22 13:03:26 -05:00
mkdir ./tmp-fonts
cd ./tmp-fonts
curl $(curl -s https://api.github.com/repos/ryanoasis/nerd-fonts/releases/latest | grep "browser_download_url.*FiraCode.zip" | cut -d : -f 2,3 | tr -d \") -LO
unzip FiraCode.zip
2024-07-10 14:29:31 -05:00
mv FiraCodeNerdFont*.ttf ~/.local/share/fonts/firacode/
2024-03-22 13:03:26 -05:00
if command_exists "xbps-install"; then
sudo xbps-install font-atkinson-hyperlegible-otf
else
2024-07-10 14:29:31 -05:00
mkdir -p ~/.local/share/fonts/atkinson-hyperlegible
curl -LO https://raw.githubusercontent.com/googlefonts/atkinson-hyperlegible/main/fonts/ttf/AtkinsonHyperlegible-Regular.ttf
curl -LO https://raw.githubusercontent.com/googlefonts/atkinson-hyperlegible/main/fonts/ttf/AtkinsonHyperlegible-Bold.ttf
curl -LO https://raw.githubusercontent.com/googlefonts/atkinson-hyperlegible/main/fonts/ttf/AtkinsonHyperlegible-Italic.ttf
curl -LO https://raw.githubusercontent.com/googlefonts/atkinson-hyperlegible/main/fonts/ttf/AtkinsonHyperlegible-BoldItalic.ttf
2024-07-10 14:29:31 -05:00
mv AtkinsonHyperlegible*.ttf ~/.local/share/fonts/atkinson-hyperlegible/
fi
2024-03-22 13:03:26 -05:00
cd -
rm -rf ./tmp-fonts