Skip to content

Commit

Permalink
feat(desktop): nerd fonts external code
Browse files Browse the repository at this point in the history
- Bump Nerd Fonts version to v3.0.1
- Use `tar.xz` archive format [`ryanoasis/nerd-fonts#1233`](ryanoasis/nerd-fonts#1233)
- Move code to default linux font folder
- Include template on MacOS font folder
  • Loading branch information
nandalopes committed May 19, 2023
1 parent 2aae4e4 commit 9a808ec
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 31 deletions.
2 changes: 1 addition & 1 deletion root/.chezmoidata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ color:
external:
fonts:
url: "https://github.com/ryanoasis/nerd-fonts/releases/latest/download"
version: "v3.0.0"
version: "v3.0.1"


sayings:
Expand Down
33 changes: 3 additions & 30 deletions root/.chezmoiexternal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,11 @@
vim:ft=yaml.gotmpl:
*/ -}}

{{- $releaseURLS := joinPath .chezmoi.homeDir ".backup/chezmoi" "gitHubLatestRelease.yaml" -}}
{{- if stat $releaseURLS -}}
{{- $releaseURLS = include $releaseURLS | fromYaml -}}
{{- else -}}
{{- $releaseURLS = .external -}}
{{- end -}}
---

# Nerd Fonts
{{- $url_download := $releaseURLS.fonts.url }}
{{- $fontPath := "" }}
{{- if eq .chezmoi.os "linux" }}
{{- $fontPath = ".local/share/fonts" }}
{{- else if eq .chezmoi.os "darwin" }}
{{- $fontPath = "Library/Fonts" }}
{{- end }}
{{- range (list "InconsolataLGC" "Meslo") }}
'{{- joinPath $fontPath (substr 0 1 . | lower) . -}}':
url: '{{- $url_download -}} / {{- . -}} .zip'
type: 'archive'
executable: true
refreshPeriod: '720h' # 30 days
exclude:
- '*NerdFontMono*'
- '*NFM*'
- '*NerdFontPropo*'
- '*NFP*'
{{- end }}
- '*DZ*'
- '*LGM*'
- '*LGL*'

#
# ZSH shell
#

# Prezto
'.zprezto':
Expand Down
1 change: 1 addition & 0 deletions root/Library/Fonts/.chezmoiexternal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- includeTemplate "dot_local/share/fonts/.chezmoiexternal.yaml" . -}}
28 changes: 28 additions & 0 deletions root/dot_local/share/fonts/.chezmoiexternal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{- /*
vim:ft=yaml.gotmpl:
*/ -}}

{{- $releaseURLS := joinPath .chezmoi.homeDir ".backup/chezmoi" "gitHubLatestRelease.yaml" -}}
{{- if stat $releaseURLS -}}
{{- $releaseURLS = include $releaseURLS | fromYaml -}}
{{- else -}}
{{- $releaseURLS = .external -}}
{{- end -}}
---

{{- $url_download := $releaseURLS.fonts.url }}
{{- range (list "InconsolataLGC" "Meslo") }}
'{{- joinPath (substr 0 1 . | lower) . -}}':
url: '{{- $url_download -}} / {{- . -}} .tar.xz'
type: 'archive'
executable: true
refreshPeriod: '720h' # 30 days
exclude:
- '*NerdFontMono*'
- '*NFM*'
- '*NerdFontPropo*'
- '*NFP*'
{{- end }}
- '*DZ*'
- '*LGM*'
- '*LGL*'

0 comments on commit 9a808ec

Please sign in to comment.