diff --git a/private_dot_config/fontconfig/fonts.conf b/private_dot_config/fontconfig/fonts.conf index 3974f4a..aff11f2 100644 --- a/private_dot_config/fontconfig/fonts.conf +++ b/private_dot_config/fontconfig/fonts.conf @@ -21,6 +21,7 @@ serif + Charis SIL Noto Serif for Powerline Noto Serif Liberation Serif @@ -32,6 +33,8 @@ sans-serif + Inter + Atkinson Hyperlegible Noto Sans for Powerline Noto Sans Liberation Sans diff --git a/run_onchange_before_0_install-packages.sh b/run_onchange_before_0_install-packages.sh index 3593a9d..53324d9 100644 --- a/run_onchange_before_0_install-packages.sh +++ b/run_onchange_before_0_install-packages.sh @@ -3,13 +3,14 @@ set -e echo "Installing packages" +echo "Updating sources..." sudo apt update -qq -for package in xsel git git-extras neovim git ripgrep; do +for package in xsel unzip git git-extras neovim git ripgrep; do if dpkg -s "$package" >/dev/null 2>&1; then echo $package is already installed. else - echo Installing $package + echo Installing $package ... sudo apt install -y $package fi done diff --git a/run_onchange_before_21_diff-so-fancy.sh b/run_onchange_before_21_diff-so-fancy.sh index 8e79ad6..a9f137a 100644 --- a/run_onchange_before_21_diff-so-fancy.sh +++ b/run_onchange_before_21_diff-so-fancy.sh @@ -6,5 +6,6 @@ if [ ! -f "$HOME/.local/bin/diff-so-fancy" ]; then mkdir -p $HOME/.local/lib git clone --depth 1 https://github.com/so-fancy/diff-so-fancy.git $HOME/.local/lib/diff-so-fancy fi + mkdir -p $HOME/.local/bin ln -s $HOME/.local/lib/diff-so-fancy/diff-so-fancy $HOME/.local/bin/diff-so-fancy fi diff --git a/run_onchange_before_25_fonts.sh b/run_onchange_before_25_fonts.sh new file mode 100755 index 0000000..f1c4caf --- /dev/null +++ b/run_onchange_before_25_fonts.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +set -euo pipefail + +FONT_DIR="${HOME}/.local/share/fonts" +TEMP_DIR=$(mktemp -d) + +cleanup() { + rm -rf "$TEMP_DIR" +} +trap cleanup EXIT + +mkdir -p "$FONT_DIR" + +echo "Installing fonts to ${FONT_DIR}..." + +# Install Nerd Fonts +NERD_FONTS_VERSION="v3.4.0" +NERD_FONTS=( + "UbuntuMono" + "SourceCodePro" + "AtkinsonHyperlegibleMono" +) + +for font in "${NERD_FONTS[@]}"; do + echo "Downloading ${font} Nerd Font..." + curl -fsSL "https://github.com/ryanoasis/nerd-fonts/releases/download/${NERD_FONTS_VERSION}/${font}.zip" -o "${TEMP_DIR}/${font}.zip" + + unzip -q "${TEMP_DIR}/${font}.zip" -d "${TEMP_DIR}/${font}" + + # Copy only TTF and OTF files, excluding Windows-compatible versions + find "${TEMP_DIR}/${font}" -type f \( -name "*.ttf" -o -name "*.otf" \) ! -name "*Windows Compatible*" -exec cp {} "${FONT_DIR}/" \; + + echo "Installed ${font} Nerd Font" +done + +# Install Inter (sans-serif) +echo "Downloading Inter..." +curl -fsSL "https://github.com/rsms/inter/releases/download/v4.1/Inter-4.1.zip" -o "${TEMP_DIR}/Inter.zip" +unzip -q "${TEMP_DIR}/Inter.zip" -d "${TEMP_DIR}/inter" +find "${TEMP_DIR}/inter" -path "*/Inter Desktop/*.ttf" -exec cp {} "${FONT_DIR}/" \; +echo "Installed Inter" + +# Install Charis SIL +echo "Downloading Charis SIL..." +CHARIS_VERSION="6.200" +curl -fsSL "https://software.sil.org/downloads/r/charis/CharisSIL-${CHARIS_VERSION}.zip" -o "${TEMP_DIR}/CharisSIL.zip" + +unzip -q "${TEMP_DIR}/CharisSIL.zip" -d "${TEMP_DIR}/charis" +find "${TEMP_DIR}/charis" -type f \( -name "*.ttf" -o -name "*.otf" \) -exec cp {} "${FONT_DIR}/" \; + +echo "Installed Charis SIL" + +# Update font cache +echo "Updating font cache..." +fc-cache -f "$FONT_DIR" +echo "Done" +