Skip to content

Instantly share code, notes, and snippets.

@sparky-raccoon
Last active May 8, 2023 15:23
Show Gist options
  • Save sparky-raccoon/513fb1dc5e98511feede3f6243abbb81 to your computer and use it in GitHub Desktop.
Save sparky-raccoon/513fb1dc5e98511feede3f6243abbb81 to your computer and use it in GitHub Desktop.
.zshrc + Powerlevel10k + lazy-loaded nvm with zsh-nvm, git & frontend-search plugins + nano + python / canvas-sketch display aliases
# /!\ Update with `exec zsh` instead of `source ~/.zshrc`
#### Main configuration
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
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
# Clock time measurement to profile shell functions
zmodload zsh/zprof
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
# ZSH_THEME="robbyrussell"
ZSH_THEME="powerlevel10k/powerlevel10k"
# Configure zsh-nvm to lazy-laod nvm
export NVM_LAZY_LOAD=true
export NVM_COMPLETION=true
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git frontend-search zsh-nvm)
# Brew Shell Completion
# Documentation : https://docs.brew.sh/Shell-Completion
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
autoload -Uz compinit
compinit
fi
source $ZSH/oh-my-zsh.sh
###### User configuration
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias display="canvas-sketch-cli --open"
alias python="/usr/bin/python3"
# Set default editor (because vim is hell)
export EDITOR=nano
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
###### Default
# If needed, default contents of .zshrc can be found at :
# https://github.com/ohmyzsh/ohmyzsh/blob/master/templates/zshrc.zsh-template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment