Skip to main content

🔺 Themes

tip

Zsh tweak - map colours to the nearest colour in the available palette.

[[ $COLORTERM = *(24bit|truecolor)* ]] || zmodload zsh/nearcolor

THP: romkatv/powerlevel10k

tip

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 how flexible ZI is and can install anything in prefered way.

The following snippet placed in .zshrc file will:

  • check if conditions are met to proceed with install
  • download, extract, clean not required files and move fonts to required directory.
  • update font cache.

When run: zi update will:

  • if update available, will update fonts.
  • repeat 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

Load prompt if terminal has least 256 colors.

zi ice if"[ "${TERM##*-}" = '256color' ] || [ "${terminfo[colors]:?}" -gt 255 ]" depth=1zi light romkatv/powerlevel10k

Oneliner:

zi ice depth=1; zi light romkatv/powerlevel10k

Meta plugin with configuration wizard disbled by default:

  • Run manually: p10k configure
zi light-mode for @romkatv

After finishing the configuration wizard last question:

  • "Apply changes to ~/.zshrc?" choose no - unless you know what you're doing.
zi ice depth'1' atload"[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh" nocdzi light romkatv/powerlevel10k

THP: ohmyzsh/robbyrussell

zi wait'!' lucid for OMZL::prompt_info_functions.zsh \  OMZT::robbyrussell

THP: z-shell/zprompts

zi lucid atload"!promptinit; typeset -g PSSHORT=0; \prompt sprint3 yellow red green blue" nocd for \  z-shell/zprompts

THP: halfo/lambda-mod-zsh-theme

zi lucid nocd for \  halfo/lambda-mod-zsh-theme

THP: geometry-zsh/geometry

zi lucid atload"!geometry::prompt" nocd \  atinit"GEOMETRY_COLOR_DIR=63 GEOMETRY_PATH_COLOR=63" for \    geometry-zsh/geometry

THP: sindresorhus/pure

zi lucid pick"/dev/null" multisrc"{async,pure}.zsh" atload"!prompt_pure_precmd" nocd for \  sindresorhus/pure
# Install as meta pluginzi light-mode for @sindresorhus/pure
# Personalisedzi light-mode for compile'(pure|async).zsh' pick'async.zsh' src'pure.zsh' atload" \  PURE_GIT_UP_ARROW='↑'; PURE_GIT_DOWN_ARROW='↓'; PURE_PROMPT_SYMBOL='ᐳ'; PURE_PROMPT_VICMD_SYMBOL='ᐸ'; \  zstyle ':prompt:pure:prompt:success' color 'green' \  zstyle ':prompt:pure:git:action' color 'yellow'; \  zstyle ':prompt:pure:git:branch' color 'blue'; \  zstyle ':prompt:pure:git:dirty' color 'red'; \  zstyle ':prompt:pure:path' color 'cyan'" \    sindresorhus/pure

THP: agkozak/agkozak-zsh-prompt

zi lucid nocd atinit"AGKOZAK_COLORS_PROMPT_CHAR='magenta' AGKOZAK_MULTILINE=0 \  AGKOZAK_PROMPT_CHAR=( ❯ ❯ ❮ ) AGKOZAK_USER_HOST_DISPLAY=0" for \    agkozak/agkozak-zsh-prompt
# Install as meta pluginzi for @agkozak/agkozak-zsh-prompt

THP: chauncey-garrett/zsh-prompt-garrett

zi ice atload"fpath+=( \$PWD );"zi light chauncey-garrett/zsh-prompt-garrettzi ice svn atload"prompt garrett" silentzi snippet PZT::modules/prompt

THP: starship/starship

zi ice as"command" from"gh-r" \  atclone"./starship init zsh > init.zsh; ./starship completions zsh > _starship" \  atpull"%atclone" src"init.zsh"zi light starship/starship

THP: robobenklein/zinc

zi ice wait'!' lucid nocompletions \  compile"{zinc_functions/*,segments/*,zinc.zsh}" \  atload'!prompt_zinc_setup; prompt_zinc_precmd'zi load robobenklein/zinc# ZINC git info is already async, but if you want it# even faster with gitstatus in Turbo mode: https://github.com/romkatv/gitstatuszi ice wait'1' atload'zinc_optional_depenency_loaded'zi load romkatv/gitstatus