zshrc_linux
export VISUAL=nano
export EDITOR=nano
DISABLE_AUTO_TITLE="true"
export DEFAULT_USER="$USER"
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(time load ram vcs)
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(status os_icon context root_indicator dir)
POWERLEVEL9K_MODE='awesome-patched'
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
POWERLEVEL9K_STATUS_VERBOSE="false"
POWERLEVEL9K_TIME_FORMAT='%t'
color_primary="black"
color_secondary="white"
POWERLEVEL9K_CONTEXT_DEFAULT_BACKGROUND="$color_primary"
POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND="$color_secondary"
POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND="$color_primary"
POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND="$color_secondary"
POWERLEVEL9K_DIR_DEFAULT_BACKGROUND="$color_primary"
POWERLEVEL9K_DIR_DEFAULT_FOREGROUND="$color_secondary"
POWERLEVEL9K_DIR_HOME_BACKGROUND="$color_primary"
POWERLEVEL9K_DIR_HOME_FOREGROUND="$color_secondary"
POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND="$color_primary"
POWERLEVEL9K_DIR_HOME_SUBFOLDER_FOREGROUND="$color_secondary"
POWERLEVEL9K_LOAD_CRITICAL_BACKGROUND="$color_primary"
POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND="$color_secondary"
POWERLEVEL9K_LOAD_WARNING_BACKGROUND="$color_primary"
POWERLEVEL9K_LOAD_WARNING_FOREGROUND="$color_secondary"
POWERLEVEL9K_LOAD_NORMAL_BACKGROUND="$color_primary"
POWERLEVEL9K_LOAD_NORMAL_FOREGROUND="$color_secondary"
POWERLEVEL9K_LOAD_CRITICAL_VISUAL_IDENTIFIER_COLOR="red"
POWERLEVEL9K_LOAD_WARNING_VISUAL_IDENTIFIER_COLOR="yellow"
POWERLEVEL9K_LOAD_NORMAL_VISUAL_IDENTIFIER_COLOR="green"
POWERLEVEL9K_OS_ICON_BACKGROUND="$color_secondary"
POWERLEVEL9K_OS_ICON_FOREGROUND="$color_primary"
POWERLEVEL9K_RAM_BACKGROUND="$color_primary"
POWERLEVEL9K_RAM_FOREGROUND="$color_secondary"
POWERLEVEL9K_RAM_CRITICAL_VISUAL_IDENTIFIER_COLOR="red"
POWERLEVEL9K_LOAD_WARNING_VISUAL_IDENTIFIER_COLOR="yellow"
POWERLEVEL9K_LOAD_NORMAL_VISUAL_IDENTIFIER_COLOR="green"
POWERLEVEL9K_ROOT_INDICATOR_BACKGROUND="$color_primary"
POWERLEVEL9K_ROOT_INDICATOR_FOREGROUND="$color_secondary"
POWERLEVEL9K_TIME_BACKGROUND="$color_primary"
POWERLEVEL9K_TIME_FOREGROUND="$color_secondary"
POWERLEVEL9K_VCS_BACKGROUND="$color_primary"
POWERLEVEL9K_VCS_FOREGROUND="$color_secondary"
POWERLEVEL9K_STATUS_FOREGROUND="$color_secondary"
alias tailsys='tail -F -n 1000 /var/log/system.log'
alias open_ports="sudo lsof -PiTCP -sTCP:LISTEN"
alias externalip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en0"
alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'"
alias PUP="pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U"
alias update='apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && npm install -g npm@latest && npm update -g; gem update --system && gem update; pip install --upgrade pip; pip install --upgrade setuptools; PUP'
alias cat='pygmentize -g'
alias zf5="zgen reset && source ~/.zshrc"
alias ldot="ls -ld .[^.]*"
alias initial_install="apt-get update && apt-get install sudo curl net-tools locate zsh zsh-common git lnav htop zip unzip python-pip bc -y; pip install pygments; pip install glances"
if ! type "wget" > /dev/null; then
apt-get install wget -y
fi
if ! type "git" > /dev/null; then
apt-get install git -y
fi
if ! apt list --installed | grep "python-fontforge" > /dev/null; then
apt-get install python-fontforge -y
fi
if [ ! -d ${HOME}/.nano/ ]; then
curl https://raw.githubusercontent.com/scopatz/nanorc/master/install.sh | sh
fi
if [ ! -d ${HOME}/GitProjects/ ]; then
mkdir ${HOME}/GitProjects
fi
if [ ! -d ${HOME}/.fonts/ ]; then
mkdir ${HOME}/.fonts
fi
if [ ! -d $HOME/GitProjects/awesome-terminal-fonts/ ]; then
git clone https://github.com/gabrielelana/awesome-terminal-fonts.git ${HOME}/GitProjects/awesome-terminal-fonts
cd ${HOME}/GitProjects/awesome-terminal-fonts
./install.sh
cd -
fi
if [ ! -d ${HOME}/GitProjects/awesome-terminal-fonts-patched ]; then
git clone https://github.com/gabrielelana/awesome-terminal-fonts.git ${HOME}/GitProjects/awesome-terminal-fonts-patched --branch=patching-strategy
cd ${HOME}/GitProjects/awesome-terminal-fonts-patched
./sourcecodepro.sh
cd -
fi
if [ ! -f ${HOME}/.zgen/zgen.zsh ]; then
echo "Zgen not found, bootstrapping."
# mkdir -p ${HOME}/.zgen
# curl -L https://raw.githubusercontent.com/tarjoilija/zgen/master/zgen.zsh > ${HOME}/.zgen/zgen.zsh
git clone https://github.com/tarjoilija/zgen.git ${HOME}/.zgen
fi
# load zgen
source "${HOME}/.zgen/zgen.zsh"
# if the init scipt doesn't exist
if ! zgen saved; then
echo "Creating a zgen save"
# specify plugins here
zgen oh-my-zsh
zgen oh-my-zsh plugins/common-aliases
zgen oh-my-zsh plugins/command-not-found
zgen load chrissicool/zsh-256color
zgen load zsh-users/zsh-history-substring-search
# load the theme
zgen load bhilburn/powerlevel9k powerlevel9k
# load whiney must-be-last plugin
zgen load zsh-users/zsh-syntax-highlighting
# generate the init script from plugins above
zgen save
fi