Skip to content

Instantly share code, notes, and snippets.

@XayOn
Last active August 30, 2019 23:02
Show Gist options
  • Save XayOn/378e7d61289efef26f23f7d07b154847 to your computer and use it in GitHub Desktop.
Save XayOn/378e7d61289efef26f23f7d07b154847 to your computer and use it in GitHub Desktop.
Get Nerd Font from latest release
get_nerd_font(){ wget $(wget https://api.github.com/repos/ryanoasis/nerd-fonts/releases/latest -O - | jq -r ".assets[]|select(.name==\"$1.zip\").browser_download_url")}
set_mono_font() {
mkdir ~/.config/fontconfig/;
echo '<match target="pattern"><test name="family" qual="any"><string>monospace</string></test><edit binding="strong" mode="prepend" name="family"><string>Sa<match target="pattern"><test name="family" qual="any"><string>monospace</string></test><edit binding="strong" mode="prepend" name="family"><string>$1</string></edit>
$1</string></edit>' > ~/.config/fontconfig/fonts.conf
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment