Skip to content

Instantly share code, notes, and snippets.

@tusharf5
Last active October 21, 2020 10:39
Show Gist options
  • Save tusharf5/7293999fbda02ee691d802b5ecfaab9f to your computer and use it in GitHub Desktop.
Save tusharf5/7293999fbda02ee691d802b5ecfaab9f to your computer and use it in GitHub Desktop.
My Zsh Config
export HOME="/Users/<USERNAME>"
export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export PYENV_VERSION=3.9.0
# Turn off all beeps
unsetopt BEEP
# Turn off autocomplete beeps
# unsetopt LIST_BEEP
function sp {
git branch > /dev/null 2>&1 || return 1
git config user.initials
}
## https://raw.githubusercontent.com/romkatv/powerlevel10k/master/config/p10k-lean.zsh
POWERLEVEL9K_CUSTOM_GIT_PAIR="echo \$(sp)"
POWERLEVEL9K_CUSTOM_GIT_PAIR_BACKGROUND="clear"
POWERLEVEL9K_CUSTOM_GIT_PAIR_FOREGROUND="blue"
POWERLEVEL9K_CUSTOM_GIT_PAIR_ICON="\uf7af"
POWERLEVEL9K_RAM_BACKGROUND="clear"
POWERLEVEL9K_AWS_BACKGROUND="clear"
POWERLEVEL9K_AWS_FOREGROUND="cyan"
POWERLEVEL9K_AWS_ICON=""
POWERLEVEL9K_DIR_DEFAULT_BACKGROUND="clear"
POWERLEVEL9K_DIR_DEFAULT_FOREGROUND="012"
POWERLEVEL9K_DIR_FOREGROUND="010"
POWERLEVEL9K_DIR_BACKGROUND="237"
POWERLEVEL9K_DIR_HOME_BACKGROUND="clear"
POWERLEVEL9K_DIR_HOME_FOREGROUND="012"
POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND="clear"
POWERLEVEL9K_DIR_HOME_SUBFOLDER_FOREGROUND="012"
POWERLEVEL9K_DIR_PATH_SEPARATOR="%F{008}/%F{cyan}"
POWERLEVEL9K_DIR_ETC_BACKGROUND="clear"
POWERLEVEL9K_ETC_ICON="%F{blue}\uf423"
POWERLEVEL9K_DIR_WRITABLE_FORBIDDEN_FOREGROUND="red"
POWERLEVEL9K_DIR_WRITABLE_FORBIDDEN_BACKGROUND="clear"
POWERLEVEL9K_HOME_ICON="\ufb26"
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(root_indicator dir dir_writable_joined custom_git_pair vcs_joined)
POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR="%F{008}\uf460%F{008}"
POWERLEVEL9K_LINUX_MANJARO_ICON="\uf312 "
POWERLEVEL9K_LINUX_UBUNTU_ICON="\uf31b "
POWERLEVEL9K_MODE="nerdfont-complete"
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=""
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX=" \uf101 "
POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR=""
POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR=""
POWERLEVEL9K_NODE_VERSION_BACKGROUND="clear"
POWERLEVEL9K_NODE_VERSION_FOREGROUND="081"
POWERLEVEL9K_OS_ICON_BACKGROUND="clear"
POWERLEVEL9K_OS_ICON_FOREGROUND="cornsilk1"
POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND="clear"
POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND="cyan"
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_CUSTOM_PYTHON_VERSION='echo "$PYENV_VERSION "'
POWERLEVEL9K_CUSTOM_PYTHON_VERSION_BACKGROUND="clear"
POWERLEVEL9K_CUSTOM_PYTHON_VERSION_FOREGROUND="yellow"
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status command_execution_time aws node_version custom_python_version os_icon)
POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR=""
POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR="%F{008}\uf104%F{008}"
POWERLEVEL9K_SHORTEN_DELIMITER="%F{008} …%F{008}"
POWERLEVEL9K_SHORTEN_DIR_LENGTH=3
POWERLEVEL9K_SHORTEN_STRATEGY="none"
POWERLEVEL9K_STATUS_ERROR_BACKGROUND="clear"
POWERLEVEL9K_STATUS_ERROR_FOREGROUND="001"
POWERLEVEL9K_STATUS_OK_BACKGROUND="clear"
POWERLEVEL9K_STATUS_BACKGROUND="clear"
POWERLEVEL9K_CARRIAGE_RETURN_ICON="\uf071"
POWERLEVEL9K_TIME_FORMAT="%D{%H:%M \uE868 %d.%m}"
POWERLEVEL9K_VCS_CLEAN_BACKGROUND="clear"
POWERLEVEL9K_VCS_CLEAN_FOREGROUND="green"
POWERLEVEL9K_VCS_MODIFIED_BACKGROUND="clear"
POWERLEVEL9K_VCS_MODIFIED_FOREGROUND="yellow"
POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND="clear"
POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND="green"
# ZSH_THEME="powerlevel9k/powerlevel9k"
ZSH_THEME="powerlevel10k/powerlevel10k"
CASE_SENSITIVE="true"
ZSH_DISABLE_COMPFIX=true
plugins=(git ssh-agent aws yarn-autocompletions)
zstyle :omz:plugins:ssh-agent identities id_rsa
source $ZSH/oh-my-zsh.sh
# ENV VARIABLES
# export NPM_TOKEN=""
export NVM_DIR="$HOME/.nvm"
## AWS SDK will load data from the config file as well
export AWS_SDK_LOAD_CONFIG=1
export AWS_DEFAULT_PROFILE=aws_test
# GO Development
export GOPATH="${HOME}/go"
mkdir -p $GOPATH/{bin,src,pkg}
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
#Python
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
# me_find_and_kill_port <port1> <port2>
me_find_and_kill_port () {
if (( $# == 0 ))
then echo usage: me_find_and_kill_port <port> ...; fi
for i; do kill -9 $(lsof -t -i:$i -sTCP:LISTEN); done
}
# Load Scripts
# This loads nvm
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# set vscode as git editor
git config --global core.editor "code --wait"
# tabtab source for packages
# uninstall by removing these lines
[[ -f ~/.config/tabtab/__tabtab.zsh ]] && . ~/.config/tabtab/__tabtab.zsh || true
# ALIASES
alias ngrok="/usr/local/bin/ngrok"
alias dc="docker-compose"
alias d="docker"
alias me-modify-startup="code ~/.zshrc"
alias me-restart-shell="source ~/.zshrc"
alias me-start-server="python -m http.server --cgi 4567"
alias me-update-brew="brew upgrade && brew update && brew cleanup -s"
apr
c-ares
gettext
jansson
libffi
libsodium
libxml2
msgpack
[email protected]
[email protected]
webp
apr-util
cmake
git
jemalloc
libiconv
libssh2
libzip
ncurses
pcre
readline
xz
aspell
curl-openssl
glib
jpeg
libidn
libtermkey
luajit
neovim
pcre2
rtmpdump
yq
autoconf
freetds
gmp
jq
libmetalink
libtiff
makedepend
nghttp2
pkg-config
sqlite
zstd
aws-cdk
freetype
go
krb5
libmpc
libtool
mcrypt
node
pure-ftpd
tidy-html5
awscli
gcc
icu4c
libev
libpng
libuv
mhash
oniguruma
pyenv
unibilium
brotli
gdbm
isl
libevent
libpq
libvterm
mpfr
openldap
[email protected]
unixodbc

FONTS

YARN AUTOCOMPLETE DOWNLOAD

YARN AUTOCOMPLETE INSTRUCTIONS

STYLIZING PROMPT

PROMPT CUSTOMIZATION

ICONS AVAILABLE

[Python] https://github.com/pyenv/pyenv#basic-github-checkout

# Install Oh My ZSH
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# Install Powerelevel Theme v10
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
# Install yarn
curl -o- -L https://yarnpkg.com/install.sh | bash
# Install Yarn

v3

Screenshot 2019-11-24 at 10 29 47 PM

v2

Screenshot 2019-11-19 at 7 10 18 PM

v1

Screenshot 2019-11-17 at 1 36 15 PM

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