Skip to content

Instantly share code, notes, and snippets.

@LucasMorais1998
Created February 10, 2025 23:10
Show Gist options
  • Save LucasMorais1998/fb7b38a5b20cc52443418c2590477288 to your computer and use it in GitHub Desktop.
Save LucasMorais1998/fb7b38a5b20cc52443418c2590477288 to your computer and use it in GitHub Desktop.
~/.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
export PATH=$HOME/bin:/usr/local/bin:$PATH
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="powerlevel10k/powerlevel10k"
plugins=(
git
git-prompt
gitfast
colored-man-pages
web-search
zsh-autosuggestions
zsh-history-substring-search
docker
docker-compose
jump
asdf
)
source $ZSH/oh-my-zsh.sh
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)"
[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
source "${ZINIT_HOME}/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
alias zshconfig="code ~/.zshrc"
alias ohmyzsh="code ~/.oh-my-zsh"
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
print -P "%F{33} %F{34}Installation successful.%f%b" || \
print -P "%F{160} The clone has failed.%f%b"
fi
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
LS_COLORS=$LS_COLORS:'ow=01;34:' ; export LS_COLORS
zinit light zdharma/fast-syntax-highlighting
zinit light zsh-users/zsh-autosuggestions
zinit light zsh-users/zsh-completions
zinit load zdharma-continuum/history-search-multi-word
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
ZSH_WEB_SEARCH_ENGINES=(
youtube "https://www.youtube.com/results?search_query="
)
source ~/powerlevel10k/powerlevel10k.zsh-theme
export PATH=$(echo $PATH | tr -s ":" | sed 's/:/\n/g' | awk '!x[$0]++' | paste -sd ":" -)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment