font settings

This commit is contained in:
2026-06-21 00:32:23 -04:00
parent ba18e56568
commit d632ab3b22
6 changed files with 299 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
# Ensure Fira Code is available for terminal apps (fontconfig)
_fonts_stamp="${XDG_STATE_HOME:-$HOME/.local/state}/fira-code-fonts"
_fonts_dir="$HOME/.local/share/fonts/FiraCode"
if ! fc-list 2>/dev/null | grep -qi 'fira code'; then
if [[ -f "$_fonts_stamp" ]] && compgen -G "$_fonts_dir/*.ttf" >/dev/null; then
fc-cache -f "$HOME/.local/share/fonts" 2>/dev/null
elif command -v dnf &>/dev/null; then
if sudo dnf install -y fira-code-fonts &>/dev/null; then
fc-cache -f 2>/dev/null
mkdir -p "${_fonts_stamp%/*}"
touch "$_fonts_stamp"
fi
fi
if ! fc-list 2>/dev/null | grep -qi 'fira code' \
&& command -v curl &>/dev/null && command -v unzip &>/dev/null; then
mkdir -p "$_fonts_dir"
_fonts_tmp=$(mktemp -d)
if curl -fsSL "https://github.com/tonsky/FiraCode/releases/download/6.2/Fira_Code_v6.2.zip" \
-o "$_fonts_tmp/FiraCode.zip" \
&& unzip -qo "$_fonts_tmp/FiraCode.zip" -d "$_fonts_tmp" \
&& cp -f "$_fonts_tmp/ttf/"*.ttf "$_fonts_dir/"; then
fc-cache -f "$HOME/.local/share/fonts" 2>/dev/null
mkdir -p "${_fonts_stamp%/*}"
touch "$_fonts_stamp"
fi
rm -rf "$_fonts_tmp"
unset _fonts_tmp
fi
fi
unset _fonts_stamp _fonts_dir
+6
View File
@@ -0,0 +1,6 @@
# VS Code extension install helper
vscode-ext-install() {
bash "${HOME}/dotfiles/vscode-server/install-vscode-extensions.sh" "$@"
}
alias vscode-ext-list='vscode-ext-install --list'