From 67c2819d63ce0723748293a583e86063bec41bba Mon Sep 17 00:00:00 2001 From: Munif Tanjim Date: Tue, 2 Jun 2020 04:08:08 +0600 Subject: [PATCH] remove setup-font --- setup-font | 69 ------------------------------------------------------ 1 file changed, 69 deletions(-) delete mode 100755 setup-font diff --git a/setup-font b/setup-font deleted file mode 100755 index 89f056d..0000000 --- a/setup-font +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -_fonts_dir="${HOME}/.fonts" - -_available_fonts=( - 'JetBrains Mono' - 'FiraCode' -) - -_selected_font="" - -function select_font() { - echo "Select Font:" - PS3="-> " - select font in "${_available_fonts[@]}"; do - if [[ -z ${font} ]]; then - echo "Invalid selection!" - exit 1 - fi - - _selected_font=${font} - break - done -} - -function download_selected_font() { - local _url="" - - case ${_selected_font} in - 'JetBrains Mono') - echo "Downloading font: ${_selected_font}" - _url=$(curl -s https://api.github.com/repos/JetBrains/JetBrainsMono/releases/latest | grep "browser_download_url.*zip" | cut -d '"' -f 4) - wget -qN --show-progress ${_url} -O ./JetBrainsMono.zip - unzip -q ./JetBrainsMono.zip - rm -rf ./JetBrainsMono/ - mv ./JetBrainsMono*/ ./JetBrainsMono - ;; - - 'FiraCode') - echo "Downloading font: ${_selected_font}" - _url=$(curl -s https://api.github.com/repos/tonsky/FiraCode/releases/latest | grep "browser_download_url.*zip" | cut -d '"' -f 4) - wget -qN --show-progress ${_url} -O ./FiraCode.zip - unzip -q ./FiraCode.zip -d FiraCode - ;; - - *) - echo "Download source not found for ${_selected_font}" - exit 1 - ;; - esac - - echo "Downloaded!" -} - -function update_font_cache() { - echo "Updating font cache..." - sudo fc-cache -f -} - -mkdir -p ${_fonts_dir} -cd ${_fonts_dir} - -select_font -download_selected_font -update_font_cache - -echo "Done!" -- knotmirror 0.0.1