mirror of
https://github.com/Xevion/dotfiles.git
synced 2026-01-31 06:24:13 -06:00
- Move fonts.toml from deployed location to meta/ directory - Update install-fonts.ts to read from meta/ and support extras array - Add comprehensive documentation explaining meta-configs pattern - Add ZedMono NF font and update Zed editor keybindings/settings
31 lines
751 B
Bash
31 lines
751 B
Bash
{{ if eq .chezmoi.os "linux" -}}
|
|
#!/bin/bash
|
|
# Font Installer Hook
|
|
# Runs automatically when meta/fonts.toml changes
|
|
#
|
|
# fonts.toml hash: {{ include "../meta/fonts.toml" | sha256sum }}
|
|
|
|
set -eu
|
|
|
|
echo "chezmoi: Font configuration changed, installing fonts..."
|
|
|
|
SCRIPT="$HOME/.local/bin/install-fonts.ts"
|
|
|
|
if [ ! -f "$SCRIPT" ]; then
|
|
echo "chezmoi: Font installer not found at $SCRIPT"
|
|
echo "chezmoi: Run 'chezmoi apply' again after the script is installed"
|
|
exit 0
|
|
fi
|
|
|
|
if ! command -v bun &> /dev/null; then
|
|
echo "chezmoi: bun not found, skipping font installation"
|
|
echo "chezmoi: Install bun and run 'chezmoi apply' again"
|
|
exit 0
|
|
fi
|
|
|
|
# Run the font installer
|
|
bun "$SCRIPT"
|
|
|
|
echo "chezmoi: Font installation complete"
|
|
{{ end -}}
|