Skip to content

Commit

Permalink
Download tar instead of zip archive when installing nerd-fonts.
Browse files Browse the repository at this point in the history
In release v3.0.2 (https://github.com/ryanoasis/nerd-fonts/releases/tag/v3.0.2), the release archives are also provided as .tar.xz which results in a size decrease of ~90%. zi can handle both tar and zi archives.

Signed-off-by: sebastian <[email protected]>
  • Loading branch information
meinzer1899 authored Oct 17, 2023
1 parent 8a37e1e commit 1039351
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions community/gallery/collection/07_themes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ fi

:::

Install fonts for powerlevel10k. It has to match your system settings as this is an example of how flexible Zi is and can install anything in a preferred way.
Install nerd fonts for powerlevel10k. It has to match your system settings as this is an example of how flexible Zi is and can install anything in a preferred way.

The following snippet placed in the `.zshrc` file will:

- check if conditions are met to proceed with the install
- check if the script runs on a Linux OS and if the specified font directory exists. You may have to adapt the fonts directory for your system (e.g. `${HOME}/.local/share/fonts`).
- download, extract, clean not required files, and move fonts to the required directory.
- update font cache.

Expand All @@ -58,7 +58,7 @@ When running: `zi update` will:

```shell
zi ice if"[[ -d ${HOME}/.fonts/ttf ]] && [[ $OSTYPE = linux* ]]" \
id-as"meslo" from"gh-r" bpick"Meslo.zip" extract nocompile depth"1" \
id-as"meslo" from"gh-r" bpick"Meslo.tar.xz" extract nocompile depth"1" \
atclone="rm -f *Windows*; mv -vf *.ttf ${HOME}/.fonts/ttf/; fc-cache -v -f" atpull"%atclone"
zi light ryanoasis/nerd-fonts
```
Expand Down

0 comments on commit 1039351

Please sign in to comment.