🔺 Themes
Related
提示
Zsh tweak - map colors to the nearest color in the available palette.
[[ $COLORTERM = *(24bit|truecolor)* ]] || zmodload zsh/nearcolor
THP: romkatv/powerlevel10k
提示
Include at the top of .zshrc
for powerlevel10k theme
~/.zshrc
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
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.
The following snippet placed in the .zshrc
file will:
- check if conditions are met to proceed with the install
- download, extract, clean not required files, and move fonts to the required directory.
- update font cache.
When running: zi update
will:
- if an update is available, will update the fonts.
- repeat the install process to update fonts.
zi ice if"[[ -d ${HOME}/.fonts/ttf ]] && [[ $OSTYPE = linux* ]]" \
id-as"meslo" from"gh-r" bpick"Meslo.zip" 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