install.fairie/home/.chezmoiscripts/universal/run_onchange_after_20-font.tmpl
Brian Zalewski e43ff06510 Update 20 files
- /system/usr/local/bin/executable_rclone-mount
- /system/etc/systemd/system/r2-docker.service
- /system/etc/systemd/system/r2-{{ .user.username }}.service.tmpl
- /system/etc/sanoid/sanoid.conf.TODO
- /system/etc/cockpit/machines.d/TODO.cockpit-machine.json.tmpl
- /system/etc/keybase/config.json
- /system/etc/rcloneignore
- /system/.chezmoidata.yaml
- /system/.chezmoiexternal.toml
- /system/.chezmoiignore
- /home/dot_config/rclone/rcloneignore
- /home/dot_config/rclone/s3-docker.service.tmpl
- /home/dot_config/rclone/s3-user.service.tmpl
- /home/dot_config/rclone/merge_rclone.conf
- /home/dot_config/cockpit/machines.d/cockpit-machine.json.TODO
- /home/dot_config/keybase/config.json
- /home/.chezmoiscripts/universal/run_onchange_after_14-keybase.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_20-font.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_50-rclone.tmpl
- /home/.chezmoiexternal.toml
2023-01-29 06:55:46 +00:00

31 lines
1.1 KiB
Cheetah

{{- if (eq .host.distro.family "linux") -}}
#!/usr/bin/env bash
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
# font config hash: {{ include (joinPath .host.home ".config" "fontconfig" "fonts.conf") | sha256sum }}
### Sync user fonts with system fonts
if [ -d /Applications ] && [ -d /System ]; then
# macOS
logg info 'Copying fonts from ~/Library/Fonts and ~/.local/share/fonts to /Library/Fonts to make them available globally'
FONT_DIR='/Library/Fonts'
sudo rsync -av "$HOME/Library/Fonts" "$FONT_DIR"
sudo rsync -av "$HOME/.local/share/fonts" "$FONT_DIR"
else
# Linux
logg info 'Copying fonts from ~/.local/share/fonts to /usr/local/share/fonts to make them available globally'
FONT_DIR='/usr/local/share/fonts'
sudo rsync -av "$HOME/.local/share/fonts" "$FONT_DIR"
fi
### Configure system font properties
if [ -d /etc/fonts ]; then
logg info 'Copying ~/.config/fontconfig/fonts.conf to /etc/fonts/local.conf'
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/fontconfig/fonts.conf" /etc/fonts/local.conf
else
logg warn 'The `/etc/fonts` directory is missing'
fi
{{ end -}}