Skip to content

Instantly share code, notes, and snippets.

@vensauro
Last active September 11, 2022 00:17
Show Gist options
  • Select an option

  • Save vensauro/0ba23868c35d1ea7badbcd6065cb2522 to your computer and use it in GitHub Desktop.

Select an option

Save vensauro/0ba23868c35d1ea7badbcd6065cb2522 to your computer and use it in GitHub Desktop.
Oh my ZSH 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
export ZSH="/home/vensauro/.oh-my-zsh"
DEFAULT_USER='vensauro'
ZSH_THEME="powerlevel10k/powerlevel10k"
COMPLETION_WAITING_DOTS="true"
plugins=(
git
sudo
last-working-dir
fast-syntax-highlighting
zsh-autosuggestions
zsh-completions
asdf
docker
docker-compose
yarn
# archlinux
)
source $ZSH/oh-my-zsh.sh
alias colar="xclip -se c -o >"
alias copiar="xclip -se c <"
alias hsi="history | grep"
alias py="python3"
alias zshconfig="code ~/.zshrc"
alias diebranchs="git for-each-ref --format '%(refname:short)' refs/heads | grep -v master | xargs git branch -D"
function export_envs() {
local envFile=${1:-.env}
while IFS='=' read -r key temp || [ -n "$key" ]; do
local isComment='^[[:space:]]*#'
local isBlank='^[[:space:]]*$'
[[ $key =~ $isComment ]] && continue
[[ $key =~ $isBlank ]] && continue
value=$(eval echo "$temp")
eval export "$key='$value'";
done < $envFile
}
autoload -Uz compinit
if [[ -n ${HOME}/.zcompdump(#qN.mh+24) ]]; then
compinit;
else
compinit -C;
fi;
# PATH and Env vars
# Node on asdf
export PATH=$PATH:/home/vensauro/.asdf/installs/nodejs/17.4.0/.npm/bin
# yarn global
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
# JAVA
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
# Android sdk
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
# Flutter
export FLUTTER_ROOT=$HOME/Flutter/Sdk
export PATH=$FLUTTER_ROOT/bin:$PATH
export CHROME_EXECUTABLE=''
export PATH="$PATH":"$HOME/.pub-cache/bin"
# Fly.io
export FLYCTL_INSTALL="/home/vensauro/.fly"
export PATH="$FLYCTL_INSTALL/bin:$PATH"
# Deno
export DENO_INSTALL="/home/vensauro/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
# g-cloud cli
if [ -f '/home/vensauro/google-cloud-sdk/path.zsh.inc' ]; then . '/home/vensauro/google-cloud-sdk/path.zsh.inc'; fi
if [ -f '/home/vensauro/google-cloud-sdk/completion.zsh.inc' ]; then . '/home/vensauro/google-cloud-sdk/completion.zsh.inc'; fi
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
@vensauro
Copy link
Author

vensauro commented Feb 2, 2022

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git \
  ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

@vensauro
Copy link
Author

vensauro commented Feb 2, 2022

git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.9.0
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf install nodejs latest
asdf global nodejs latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment