Skip to content

Instantly share code, notes, and snippets.

@richardprice
Forked from jchannon/.zshrc
Created January 18, 2016 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richardprice/bac395c41bfe8683b94f to your computer and use it in GitHub Desktop.
Save richardprice/bac395c41bfe8683b94f to your computer and use it in GitHub Desktop.
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="ducknorris"
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
# User configuration
export PATH=$HOME/bin:/usr/local/bin:$PATH
# export MANPATH="/usr/local/man:$MANPATH"
source $ZSH/oh-my-zsh.sh
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"
# 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 reload=". ~/.zshrc && echo 'ZSH config reloaded from ~/.zshrc'"
alias projects='cd /c/Projects'
# ducknorris custom theme
# FreeAgent puts the powerline style in zsh !
POWERLINE_HIDE_HOST_NAME="true"
if [ "$POWERLINE_DATE_FORMAT" = "" ]; then
POWERLINE_DATE_FORMAT=%D{%Y-%m-%d}
fi
if [ "$POWERLINE_RIGHT_B" = "" ]; then
POWERLINE_RIGHT_B=%D{%H:%M:%S}
elif [ "$POWERLINE_RIGHT_B" = "none" ]; then
POWERLINE_RIGHT_B=""
fi
if [ "$POWERLINE_RIGHT_A" = "mixed" ]; then
POWERLINE_RIGHT_A=%(?."$POWERLINE_DATE_FORMAT".%F{red}✘ %?)
elif [ "$POWERLINE_RIGHT_A" = "exit-status" ]; then
POWERLINE_RIGHT_A=%(?.%F{green}✔ %?.%F{red}✘ %?)
elif [ "$POWERLINE_RIGHT_A" = "date" ]; then
POWERLINE_RIGHT_A="$POWERLINE_DATE_FORMAT"
fi
if [ "$POWERLINE_HIDE_USER_NAME" = "" ] && [ "$POWERLINE_HIDE_HOST_NAME" = "" ]; then
POWERLINE_USER_NAME="%n@"'%m'
elif [ "$POWERLINE_HIDE_USER_NAME" != "" ] && [ "$POWERLINE_HIDE_HOST_NAME" = "" ]; then
POWERLINE_USER_NAME="@%m"
elif [ "$POWERLINE_HIDE_USER_NAME" = "" ] && [ "$POWERLINE_HIDE_HOST_NAME" != "" ]; then
POWERLINE_USER_NAME="%n"
else
POWERLINE_USER_NAME=""
fi
POWERLINE_CURRENT_PATH="%d"
if [ "$POWERLINE_FULL_CURRENT_PATH" = "" ]; then
POWERLINE_CURRENT_PATH="%1~"
fi
if [ "$POWERLINE_GIT_CLEAN" = "" ]; then
POWERLINE_GIT_CLEAN="✔"
fi
if [ "$POWERLINE_GIT_DIRTY" = "" ]; then
POWERLINE_GIT_DIRTY="✘"
fi
if [ "$POWERLINE_GIT_ADDED" = "" ]; then
POWERLINE_GIT_ADDED="%F{green}✚%F{black}"
fi
if [ "$POWERLINE_GIT_MODIFIED" = "" ]; then
POWERLINE_GIT_MODIFIED="%F{blue}✹%F{black}"
fi
if [ "$POWERLINE_GIT_DELETED" = "" ]; then
POWERLINE_GIT_DELETED="%F{red}✖%F{black}"
fi
if [ "$POWERLINE_GIT_UNTRACKED" = "" ]; then
POWERLINE_GIT_UNTRACKED="%F{yellow}✭%F{black}"
fi
if [ "$POWERLINE_GIT_RENAMED" = "" ]; then
POWERLINE_GIT_RENAMED="➜"
fi
if [ "$POWERLINE_GIT_UNMERGED" = "" ]; then
POWERLINE_GIT_UNMERGED="═"
fi
ZSH_THEME_GIT_PROMPT_PREFIX=" \ue0a0 "
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY=" $POWERLINE_GIT_DIRTY"
ZSH_THEME_GIT_PROMPT_CLEAN=" $POWERLINE_GIT_CLEAN"
ZSH_THEME_GIT_PROMPT_ADDED=" $POWERLINE_GIT_ADDED"
ZSH_THEME_GIT_PROMPT_MODIFIED=" $POWERLINE_GIT_MODIFIED"
ZSH_THEME_GIT_PROMPT_DELETED=" $POWERLINE_GIT_DELETED"
ZSH_THEME_GIT_PROMPT_UNTRACKED=" $POWERLINE_GIT_UNTRACKED"
ZSH_THEME_GIT_PROMPT_RENAMED=" $POWERLINE_GIT_RENAMED"
ZSH_THEME_GIT_PROMPT_UNMERGED=" $POWERLINE_GIT_UNMERGED"
ZSH_THEME_GIT_PROMPT_AHEAD=" ⬆"
ZSH_THEME_GIT_PROMPT_BEHIND=" ⬇"
ZSH_THEME_GIT_PROMPT_DIVERGED=" ⬍"
if [ "$POWERLINE_SHOW_GIT_ON_RIGHT" = "" ]; then
if [ "$POWERLINE_HIDE_GIT_PROMPT_STATUS" = "" ]; then
POWERLINE_GIT_INFO_LEFT=" %F{blue}%K{white}"$'\ue0b0'"%F{white}%F{black}%K{white}"$'$(git_prompt_info)$(git_prompt_status)%F{white}'
else
POWERLINE_GIT_INFO_LEFT=" %F{blue}%K{white}"$'\ue0b0'"%F{white}%F{black}%K{white}"$'$(git_prompt_info)%F{white}'
fi
POWERLINE_GIT_INFO_RIGHT=""
else
POWERLINE_GIT_INFO_LEFT=""
POWERLINE_GIT_INFO_RIGHT="%F{white}"$'\ue0b2'"%F{black}%K{white}"$'$(git_prompt_info)'" %K{white}"
fi
if [ $(id -u) -eq 0 ]; then
POWERLINE_SEC1_BG=%K{red}
POWERLINE_SEC1_FG=%F{red}
else
POWERLINE_SEC1_BG=%K{green}
POWERLINE_SEC1_FG=%F{green}
fi
POWERLINE_SEC1_TXT=%F{black}
if [ "$POWERLINE_DETECT_SSH" != "" ]; then
if [ -n "$SSH_CLIENT" ]; then
POWERLINE_SEC1_BG=%K{red}
POWERLINE_SEC1_FG=%F{red}
POWERLINE_SEC1_TXT=%F{white}
fi
fi
PROMPT="$POWERLINE_SEC1_BG$POWERLINE_SEC1_TXT $POWERLINE_USER_NAME %k%f$POWERLINE_SEC1_FG%K{blue}"$'\ue0b0'"%k%f%F{white}%K{blue} "$POWERLINE_CURRENT_PATH"%F{blue}"$POWERLINE_GIT_INFO_LEFT" %k"$'\ue0b0'"%f "
if [ "$POWERLINE_NO_BLANK_LINE" = "" ]; then
PROMPT="
"$PROMPT
fi
if [ "$POWERLINE_DISABLE_RPROMPT" = "" ]; then
if [ "$POWERLINE_RIGHT_A" = "" ]; then
RPROMPT="$POWERLINE_GIT_INFO_RIGHT%F{white}"$'\ue0b2'"%k%F{black}%K{white} $POWERLINE_RIGHT_B %f%k"
elif [ "$POWERLINE_RIGHT_B" = "" ]; then
RPROMPT="$POWERLINE_GIT_INFO_RIGHT%F{white}"$'\ue0b2'"%k%F{240}%K{white} $POWERLINE_RIGHT_A %f%k"
else
RPROMPT="$POWERLINE_GIT_INFO_RIGHT%F{white}"$'\ue0b2'"%k%F{black}%K{white} $POWERLINE_RIGHT_B %f%F{240}"$'\ue0b2'"%f%k%K{240}%F{255} $POWERLINE_RIGHT_A %f%k"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment