/my-p10k

My .p10k.zsh file with prefered settings and colors for MacOs

Primary LanguageShell

My p10k

This repo contain .p10k.zsh file with prefered settings and colors for MacOs.

Prerequist

Setup powerlevel10k: https://github.com/romkatv/powerlevel10k.

The .zshrc file should be generated by wizard:

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

source /opt/homebrew/opt/powerlevel10k/powerlevel10k.zsh-theme

[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

Theme

The p10k theme file just contain prefered settings and colors: colors are marked by comment:

# MATERIAL_OCEAN_COLOR

History

Avoid duplicate history appending this content to .zshrc:

HISTSIZE=5000
HISTFILE=~/.zsh_history
SAVEHIST=5000
HISTDUP=erase
setopt appendhistory
setopt sharehistory
setopt incappendhistory
setopt hist_ignore_all_dups
setopt hist_save_no_dups
setopt hist_ignore_dups
setopt hist_find_no_dups

Auto suggestions

Setup autosuggestions: https://github.com/zsh-users/zsh-autosuggestions.

  • Install with brew.

The .zshrc file should append:

source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh

Syntax-highlighting

Setup autosuggestions: https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md.

  • Install with brew.

The .zshrc file should append:

source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh