chezmoi init
This commit is contained in:
commit
530d6d7195
1176 changed files with 111325 additions and 0 deletions
7
dot_oh-my-zsh/themes/3den.zsh-theme
Normal file
7
dot_oh-my-zsh/themes/3den.zsh-theme
Normal file
|
@ -0,0 +1,7 @@
|
|||
PROMPT=$'%{$fg[white]%}$(ruby_prompt_info) %{$fg_bold[cyan]%}%~%{$reset_color%}$(git_prompt_info) %{$fg[cyan]%}%D{[%I:%M:%S]}\
|
||||
%{$fg_bold[green]%}%n$%{$reset_color%} '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="*"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
85
dot_oh-my-zsh/themes/Soliah.zsh-theme
Normal file
85
dot_oh-my-zsh/themes/Soliah.zsh-theme
Normal file
|
@ -0,0 +1,85 @@
|
|||
PROMPT='%{$fg[blue]%}%n%{$reset_color%} on %{$fg[red]%}%M%{$reset_color%} in %{$fg[blue]%}%~%b%{$reset_color%}$(git_time_since_commit)$(check_git_prompt_info)
|
||||
$ '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
|
||||
|
||||
# Text to display if the branch is dirty
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
|
||||
|
||||
# Text to display if the branch is clean
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# Colors vary depending on time lapsed.
|
||||
ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM="%{$fg[yellow]%}"
|
||||
ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG="%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[cyan]%}"
|
||||
|
||||
|
||||
# Git sometimes goes into a detached head state. git_prompt_info doesn't
|
||||
# return anything in this case. So wrap it in another function and check
|
||||
# for an empty string.
|
||||
function check_git_prompt_info() {
|
||||
if git rev-parse --git-dir > /dev/null 2>&1; then
|
||||
if [[ -z $(git_prompt_info) ]]; then
|
||||
echo "%{$fg[magenta]%}detached-head%{$reset_color%})"
|
||||
else
|
||||
echo "$(git_prompt_info)"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Determine if we are using a gemset.
|
||||
function rvm_gemset() {
|
||||
if hash rvm 2>/dev/null; then
|
||||
GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
|
||||
if [[ -n $GEMSET ]]; then
|
||||
echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Determine the time since last commit. If branch is clean,
|
||||
# use a neutral color, otherwise colors will vary according to time.
|
||||
function git_time_since_commit() {
|
||||
if git rev-parse --git-dir > /dev/null 2>&1; then
|
||||
# Only proceed if there is actually a commit.
|
||||
if last_commit=`git -c log.showSignature=false log --pretty=format:'%at' -1 2> /dev/null`; then
|
||||
now=`date +%s`
|
||||
seconds_since_last_commit=$((now-last_commit))
|
||||
|
||||
# Totals
|
||||
MINUTES=$((seconds_since_last_commit / 60))
|
||||
HOURS=$((seconds_since_last_commit/3600))
|
||||
|
||||
# Sub-hours and sub-minutes
|
||||
DAYS=$((seconds_since_last_commit / 86400))
|
||||
SUB_HOURS=$((HOURS % 24))
|
||||
SUB_MINUTES=$((MINUTES % 60))
|
||||
|
||||
if [[ -n $(git status -s 2> /dev/null) ]]; then
|
||||
if [ "$MINUTES" -gt 30 ]; then
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG"
|
||||
elif [ "$MINUTES" -gt 10 ]; then
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM"
|
||||
else
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT"
|
||||
fi
|
||||
else
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL"
|
||||
fi
|
||||
|
||||
if [ "$HOURS" -gt 24 ]; then
|
||||
echo "($(rvm_gemset)$COLOR${DAYS}d${SUB_HOURS}h${SUB_MINUTES}m%{$reset_color%}|"
|
||||
elif [ "$MINUTES" -gt 60 ]; then
|
||||
echo "($(rvm_gemset)$COLOR${HOURS}h${SUB_MINUTES}m%{$reset_color%}|"
|
||||
else
|
||||
echo "($(rvm_gemset)$COLOR${MINUTES}m%{$reset_color%}|"
|
||||
fi
|
||||
else
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL"
|
||||
echo "($(rvm_gemset)$COLOR~|"
|
||||
fi
|
||||
fi
|
||||
}
|
118
dot_oh-my-zsh/themes/adben.zsh-theme
Normal file
118
dot_oh-my-zsh/themes/adben.zsh-theme
Normal file
|
@ -0,0 +1,118 @@
|
|||
#!/usr/bin/env zsh
|
||||
# #
|
||||
# # #README
|
||||
# #
|
||||
# # This theme provides two customizable header functionalities:
|
||||
# # a) displaying a pseudo-random message from a database of quotations
|
||||
# # (https://en.wikipedia.org/wiki/Fortune_%28Unix%29)
|
||||
# # b) displaying randomly command line tips from The command line fu
|
||||
# # (https://www.commandlinefu.com) community: in order to make use of this functionality
|
||||
# # you will need Internet connection.
|
||||
# # This theme provides as well information for the current user's context, like;
|
||||
# # branch and status for the current version control system (git and svn currently
|
||||
# # supported) and time, presented to the user in a non invasive volatile way.
|
||||
# #
|
||||
# # #REQUIREMENTS
|
||||
# # This theme requires wget::
|
||||
# # -Homebrew-osx- brew install wget
|
||||
# # -Debian/Ubuntu- apt-get install wget
|
||||
# # and fortune ::
|
||||
# # -Homebrew-osx- brew install fortune
|
||||
# # -Debian/Ubuntu- apt-get install fortune
|
||||
# #
|
||||
# # optionally:
|
||||
# # -Oh-myzsh vcs plug-ins git and svn.
|
||||
# # -Solarized theme (https://github.com/altercation/solarized/)
|
||||
# # -OS X: iTerm 2 (https://iterm2.com/)
|
||||
# # -font Source code pro (https://github.com/adobe/source-code-pro)
|
||||
# #
|
||||
# # This theme's look and feel is based on the Aaron Toponce's zsh theme, more info:
|
||||
# # https://pthree.org/2008/11/23/727/
|
||||
# # enjoy!
|
||||
|
||||
########## COLOR ###########
|
||||
for COLOR in CYAN WHITE YELLOW MAGENTA BLACK BLUE RED DEFAULT GREEN GREY; do
|
||||
typeset -g PR_$COLOR="%b%{$fg[${(L)COLOR}]%}"
|
||||
typeset -g PR_BRIGHT_$COLOR="%B%{$fg[${(L)COLOR}]%}"
|
||||
done
|
||||
PR_RESET="%{$reset_color%}"
|
||||
|
||||
RED_START="${PR_GREY}<${PR_RED}<${PR_BRIGHT_RED}<${PR_RESET} "
|
||||
RED_END="${PR_BRIGHT_RED}>${PR_RED}>${PR_GREY}>${PR_RESET} "
|
||||
GREEN_START="${PR_GREY}>${PR_GREEN}>${PR_BRIGHT_GREEN}>${PR_RESET}"
|
||||
GREEN_END="${PR_BRIGHT_GREEN}>${PR_GREEN}>${PR_GREY}>${PR_RESET} "
|
||||
|
||||
########## VCS ###########
|
||||
VCS_DIRTY_COLOR="${PR_YELLOW}"
|
||||
VCS_CLEAN_COLOR="${PR_GREEN}"
|
||||
VCS_SUFFIX_COLOR="${PR_RED}› ${PR_RESET}"
|
||||
|
||||
########## SVN ###########
|
||||
ZSH_THEME_SVN_PROMPT_PREFIX="${PR_RED}‹svn:"
|
||||
ZSH_THEME_SVN_PROMPT_SUFFIX="${VCS_SUFFIX_COLOR}"
|
||||
ZSH_THEME_SVN_PROMPT_DIRTY="${VCS_DIRTY_COLOR} ✘"
|
||||
ZSH_THEME_SVN_PROMPT_CLEAN="${VCS_CLEAN_COLOR} ✔"
|
||||
|
||||
########## GIT ###########
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="${PR_RED}‹git:"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="${VCS_SUFFIX_COLOR}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="${VCS_DIRTY_COLOR} ✘"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="${VCS_CLEAN_COLOR} ✔"
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="${PR_YELLOW} ✚"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="${PR_YELLOW} ✹"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="${PR_YELLOW} ✖"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="${PR_YELLOW} ➜"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="${PR_YELLOW} ═"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="${PR_YELLOW} ✭"
|
||||
|
||||
# Get a fortune quote
|
||||
ps1_fortune() {
|
||||
if (( ${+commands[fortune]} )); then
|
||||
fortune
|
||||
fi
|
||||
}
|
||||
|
||||
# Obtain a command tip
|
||||
ps1_command_tip() {
|
||||
{
|
||||
if (( ${+commands[wget]} )); then
|
||||
command wget -qO- https://www.commandlinefu.com/commands/random/plaintext
|
||||
elif (( ${+commands[curl]} )); then
|
||||
command curl -fsL https://www.commandlinefu.com/commands/random/plaintext
|
||||
fi
|
||||
} | sed '1d;/^$/d'
|
||||
}
|
||||
|
||||
# Show prompt header (fortune / command tip)
|
||||
prompt_header() {
|
||||
local header=$(
|
||||
case "${ENABLE_COMMAND_TIP:-}" in
|
||||
true) ps1_command_tip ;;
|
||||
*) ps1_fortune ;;
|
||||
esac
|
||||
)
|
||||
|
||||
# Make sure to quote % so that they're not expanded by the prompt
|
||||
echo -n "${header:gs/%/%%}"
|
||||
}
|
||||
|
||||
# Context: user@directory or just directory
|
||||
prompt_context() {
|
||||
if [[ "$USERNAME" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
|
||||
echo -n "${PR_RESET}${PR_RED}%n@%m"
|
||||
fi
|
||||
}
|
||||
|
||||
########## SETUP ###########
|
||||
|
||||
# Required for the prompt
|
||||
setopt prompt_subst
|
||||
|
||||
# Prompt: header, context (user@host), directory
|
||||
PROMPT="${RED_START}${PR_YELLOW}\$(prompt_header)${PR_RESET}
|
||||
${RED_START}\$(prompt_context)${PR_BRIGHT_YELLOW}%~${PR_RESET}
|
||||
${GREEN_START} "
|
||||
# Right prompt: vcs status + time
|
||||
RPROMPT="\$(git_prompt_info)\$(svn_prompt_info)${PR_YELLOW}%D{%R.%S %a %b %d %Y} ${GREEN_END}"
|
||||
# Matching continuation prompt
|
||||
PROMPT2="${GREEN_START} %_ ${GREEN_START} "
|
47
dot_oh-my-zsh/themes/af-magic.zsh-theme
Normal file
47
dot_oh-my-zsh/themes/af-magic.zsh-theme
Normal file
|
@ -0,0 +1,47 @@
|
|||
# af-magic.zsh-theme
|
||||
#
|
||||
# Author: Andy Fleming
|
||||
# URL: http://andyfleming.com/
|
||||
|
||||
# dashed separator size
|
||||
function afmagic_dashes {
|
||||
# check either virtualenv or condaenv variables
|
||||
local python_env_dir="${VIRTUAL_ENV:-$CONDA_DEFAULT_ENV}"
|
||||
local python_env="${python_env_dir##*/}"
|
||||
|
||||
# if there is a python virtual environment and it is displayed in
|
||||
# the prompt, account for it when returning the number of dashes
|
||||
if [[ -n "$python_env" && "$PS1" = *\(${python_env}\)* ]]; then
|
||||
echo $(( COLUMNS - ${#python_env} - 3 ))
|
||||
else
|
||||
echo $COLUMNS
|
||||
fi
|
||||
}
|
||||
|
||||
# primary prompt: dashed separator, directory and vcs info
|
||||
PS1="${FG[237]}\${(l.\$(afmagic_dashes)..-.)}%{$reset_color%}
|
||||
${FG[032]}%~\$(git_prompt_info)\$(hg_prompt_info) ${FG[105]}%(!.#.»)%{$reset_color%} "
|
||||
PS2="%{$fg[red]%}\ %{$reset_color%}"
|
||||
|
||||
# right prompt: return code, virtualenv and context (user@host)
|
||||
RPS1="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
if (( $+functions[virtualenv_prompt_info] )); then
|
||||
RPS1+='$(virtualenv_prompt_info)'
|
||||
fi
|
||||
RPS1+=" ${FG[237]}%n@%m%{$reset_color%}"
|
||||
|
||||
# git settings
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" ${FG[075]}(${FG[078]}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="${FG[214]}*%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="${FG[075]})%{$reset_color%}"
|
||||
|
||||
# hg settings
|
||||
ZSH_THEME_HG_PROMPT_PREFIX=" ${FG[075]}(${FG[078]}"
|
||||
ZSH_THEME_HG_PROMPT_CLEAN=""
|
||||
ZSH_THEME_HG_PROMPT_DIRTY="${FG[214]}*%{$reset_color%}"
|
||||
ZSH_THEME_HG_PROMPT_SUFFIX="${FG[075]})%{$reset_color%}"
|
||||
|
||||
# virtualenv settings
|
||||
ZSH_THEME_VIRTUALENV_PREFIX=" ${FG[075]}["
|
||||
ZSH_THEME_VIRTUALENV_SUFFIX="]%{$reset_color%}"
|
10
dot_oh-my-zsh/themes/afowler.zsh-theme
Normal file
10
dot_oh-my-zsh/themes/afowler.zsh-theme
Normal file
|
@ -0,0 +1,10 @@
|
|||
PROMPT='%m %B%F{blue}:: %b%F{green}%3~ $(hg_prompt_info)$(git_prompt_info)%B%(!.%F{red}.%F{blue})»%f%b '
|
||||
RPS1='%(?..%F{red}%? ↵%f)'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
|
||||
|
||||
ZSH_THEME_HG_PROMPT_PREFIX="%{$fg[magenta]%}hg:‹%{$fg[yellow]%}"
|
||||
ZSH_THEME_HG_PROMPT_SUFFIX="%{$fg[magenta]%}› %{$reset_color%}"
|
||||
ZSH_THEME_HG_PROMPT_DIRTY=" %{$fg[red]%}✗"
|
||||
ZSH_THEME_HG_PROMPT_CLEAN=""
|
271
dot_oh-my-zsh/themes/agnoster.zsh-theme
Normal file
271
dot_oh-my-zsh/themes/agnoster.zsh-theme
Normal file
|
@ -0,0 +1,271 @@
|
|||
# vim:ft=zsh ts=2 sw=2 sts=2
|
||||
#
|
||||
# agnoster's Theme - https://gist.github.com/3712874
|
||||
# A Powerline-inspired theme for ZSH
|
||||
#
|
||||
# # README
|
||||
#
|
||||
# In order for this theme to render correctly, you will need a
|
||||
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
|
||||
# Make sure you have a recent version: the code points that Powerline
|
||||
# uses changed in 2012, and older versions will display incorrectly,
|
||||
# in confusing ways.
|
||||
#
|
||||
# In addition, I recommend the
|
||||
# [Solarized theme](https://github.com/altercation/solarized/) and, if you're
|
||||
# using it on Mac OS X, [iTerm 2](https://iterm2.com/) over Terminal.app -
|
||||
# it has significantly better color fidelity.
|
||||
#
|
||||
# If using with "light" variant of the Solarized color schema, set
|
||||
# SOLARIZED_THEME variable to "light". If you don't specify, we'll assume
|
||||
# you're using the "dark" variant.
|
||||
#
|
||||
# # Goals
|
||||
#
|
||||
# The aim of this theme is to only show you *relevant* information. Like most
|
||||
# prompts, it will only show git information when in a git working directory.
|
||||
# However, it goes a step further: everything from the current user and
|
||||
# hostname to whether the last call exited with an error to whether background
|
||||
# jobs are running in this shell will all be displayed automatically when
|
||||
# appropriate.
|
||||
|
||||
### Segment drawing
|
||||
# A few utility functions to make it easy and re-usable to draw segmented prompts
|
||||
|
||||
CURRENT_BG='NONE'
|
||||
|
||||
case ${SOLARIZED_THEME:-dark} in
|
||||
light) CURRENT_FG='white';;
|
||||
*) CURRENT_FG='black';;
|
||||
esac
|
||||
|
||||
# Special Powerline characters
|
||||
|
||||
() {
|
||||
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
|
||||
# NOTE: This segment separator character is correct. In 2012, Powerline changed
|
||||
# the code points they use for their special characters. This is the new code point.
|
||||
# If this is not working for you, you probably have an old version of the
|
||||
# Powerline-patched fonts installed. Download and install the new version.
|
||||
# Do not submit PRs to change this unless you have reviewed the Powerline code point
|
||||
# history and have new information.
|
||||
# This is defined using a Unicode escape sequence so it is unambiguously readable, regardless of
|
||||
# what font the user is viewing this source code in. Do not replace the
|
||||
# escape sequence with a single literal character.
|
||||
# Do not change this! Do not make it '\u2b80'; that is the old, wrong code point.
|
||||
SEGMENT_SEPARATOR=$'\ue0b0'
|
||||
}
|
||||
|
||||
# Begin a segment
|
||||
# Takes two arguments, background and foreground. Both can be omitted,
|
||||
# rendering default background/foreground.
|
||||
prompt_segment() {
|
||||
local bg fg
|
||||
[[ -n $1 ]] && bg="%K{$1}" || bg="%k"
|
||||
[[ -n $2 ]] && fg="%F{$2}" || fg="%f"
|
||||
if [[ $CURRENT_BG != 'NONE' && $1 != $CURRENT_BG ]]; then
|
||||
echo -n " %{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%} "
|
||||
else
|
||||
echo -n "%{$bg%}%{$fg%} "
|
||||
fi
|
||||
CURRENT_BG=$1
|
||||
[[ -n $3 ]] && echo -n $3
|
||||
}
|
||||
|
||||
# End the prompt, closing any open segments
|
||||
prompt_end() {
|
||||
if [[ -n $CURRENT_BG ]]; then
|
||||
echo -n " %{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR"
|
||||
else
|
||||
echo -n "%{%k%}"
|
||||
fi
|
||||
echo -n "%{%f%}"
|
||||
CURRENT_BG=''
|
||||
}
|
||||
|
||||
### Prompt components
|
||||
# Each component will draw itself, and hide itself if no information needs to be shown
|
||||
|
||||
# Context: user@hostname (who am I and where am I)
|
||||
prompt_context() {
|
||||
if [[ "$USERNAME" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
|
||||
prompt_segment black default "%(!.%{%F{yellow}%}.)%n@%m"
|
||||
fi
|
||||
}
|
||||
|
||||
# Git: branch/detached head, dirty status
|
||||
prompt_git() {
|
||||
(( $+commands[git] )) || return
|
||||
if [[ "$(command git config --get oh-my-zsh.hide-status 2>/dev/null)" = 1 ]]; then
|
||||
return
|
||||
fi
|
||||
local PL_BRANCH_CHAR
|
||||
() {
|
||||
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
|
||||
PL_BRANCH_CHAR=$'\ue0a0' #
|
||||
}
|
||||
local ref dirty mode repo_path
|
||||
|
||||
if [[ "$(command git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]]; then
|
||||
repo_path=$(command git rev-parse --git-dir 2>/dev/null)
|
||||
dirty=$(parse_git_dirty)
|
||||
ref=$(command git symbolic-ref HEAD 2> /dev/null) || \
|
||||
ref="◈ $(command git describe --exact-match --tags HEAD 2> /dev/null)" || \
|
||||
ref="➦ $(command git rev-parse --short HEAD 2> /dev/null)"
|
||||
if [[ -n $dirty ]]; then
|
||||
prompt_segment yellow black
|
||||
else
|
||||
prompt_segment green $CURRENT_FG
|
||||
fi
|
||||
|
||||
local ahead behind
|
||||
ahead=$(command git log --oneline @{upstream}.. 2>/dev/null)
|
||||
behind=$(command git log --oneline ..@{upstream} 2>/dev/null)
|
||||
if [[ -n "$ahead" ]] && [[ -n "$behind" ]]; then
|
||||
PL_BRANCH_CHAR=$'\u21c5'
|
||||
elif [[ -n "$ahead" ]]; then
|
||||
PL_BRANCH_CHAR=$'\u21b1'
|
||||
elif [[ -n "$behind" ]]; then
|
||||
PL_BRANCH_CHAR=$'\u21b0'
|
||||
fi
|
||||
|
||||
if [[ -e "${repo_path}/BISECT_LOG" ]]; then
|
||||
mode=" <B>"
|
||||
elif [[ -e "${repo_path}/MERGE_HEAD" ]]; then
|
||||
mode=" >M<"
|
||||
elif [[ -e "${repo_path}/rebase" || -e "${repo_path}/rebase-apply" || -e "${repo_path}/rebase-merge" || -e "${repo_path}/../.dotest" ]]; then
|
||||
mode=" >R>"
|
||||
fi
|
||||
|
||||
setopt promptsubst
|
||||
autoload -Uz vcs_info
|
||||
|
||||
zstyle ':vcs_info:*' enable git
|
||||
zstyle ':vcs_info:*' get-revision true
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:*' stagedstr '✚'
|
||||
zstyle ':vcs_info:*' unstagedstr '±'
|
||||
zstyle ':vcs_info:*' formats ' %u%c'
|
||||
zstyle ':vcs_info:*' actionformats ' %u%c'
|
||||
vcs_info
|
||||
echo -n "${${ref:gs/%/%%}/refs\/heads\//$PL_BRANCH_CHAR }${vcs_info_msg_0_%% }${mode}"
|
||||
fi
|
||||
}
|
||||
|
||||
prompt_bzr() {
|
||||
(( $+commands[bzr] )) || return
|
||||
|
||||
# Test if bzr repository in directory hierarchy
|
||||
local dir="$PWD"
|
||||
while [[ ! -d "$dir/.bzr" ]]; do
|
||||
[[ "$dir" = "/" ]] && return
|
||||
dir="${dir:h}"
|
||||
done
|
||||
|
||||
local bzr_status status_mod status_all revision
|
||||
if bzr_status=$(command bzr status 2>&1); then
|
||||
status_mod=$(echo -n "$bzr_status" | head -n1 | grep "modified" | wc -m)
|
||||
status_all=$(echo -n "$bzr_status" | head -n1 | wc -m)
|
||||
revision=${$(command bzr log -r-1 --log-format line | cut -d: -f1):gs/%/%%}
|
||||
if [[ $status_mod -gt 0 ]] ; then
|
||||
prompt_segment yellow black "bzr@$revision ✚"
|
||||
else
|
||||
if [[ $status_all -gt 0 ]] ; then
|
||||
prompt_segment yellow black "bzr@$revision"
|
||||
else
|
||||
prompt_segment green black "bzr@$revision"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
prompt_hg() {
|
||||
(( $+commands[hg] )) || return
|
||||
local rev st branch
|
||||
if $(command hg id >/dev/null 2>&1); then
|
||||
if $(command hg prompt >/dev/null 2>&1); then
|
||||
if [[ $(command hg prompt "{status|unknown}") = "?" ]]; then
|
||||
# if files are not added
|
||||
prompt_segment red white
|
||||
st='±'
|
||||
elif [[ -n $(command hg prompt "{status|modified}") ]]; then
|
||||
# if any modification
|
||||
prompt_segment yellow black
|
||||
st='±'
|
||||
else
|
||||
# if working copy is clean
|
||||
prompt_segment green $CURRENT_FG
|
||||
fi
|
||||
echo -n ${$(command hg prompt "☿ {rev}@{branch}"):gs/%/%%} $st
|
||||
else
|
||||
st=""
|
||||
rev=$(command hg id -n 2>/dev/null | sed 's/[^-0-9]//g')
|
||||
branch=$(command hg id -b 2>/dev/null)
|
||||
if command hg st | command grep -q "^\?"; then
|
||||
prompt_segment red black
|
||||
st='±'
|
||||
elif command hg st | command grep -q "^[MA]"; then
|
||||
prompt_segment yellow black
|
||||
st='±'
|
||||
else
|
||||
prompt_segment green $CURRENT_FG
|
||||
fi
|
||||
echo -n "☿ ${rev:gs/%/%%}@${branch:gs/%/%%}" $st
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Dir: current working directory
|
||||
prompt_dir() {
|
||||
prompt_segment blue $CURRENT_FG '%~'
|
||||
}
|
||||
|
||||
# Virtualenv: current working virtualenv
|
||||
prompt_virtualenv() {
|
||||
if [[ -n "$VIRTUAL_ENV" && -n "$VIRTUAL_ENV_DISABLE_PROMPT" ]]; then
|
||||
prompt_segment blue black "(${VIRTUAL_ENV:t:gs/%/%%})"
|
||||
fi
|
||||
}
|
||||
|
||||
# Status:
|
||||
# - was there an error
|
||||
# - am I root
|
||||
# - are there background jobs?
|
||||
prompt_status() {
|
||||
local -a symbols
|
||||
|
||||
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘"
|
||||
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"
|
||||
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙"
|
||||
|
||||
[[ -n "$symbols" ]] && prompt_segment black default "$symbols"
|
||||
}
|
||||
|
||||
#AWS Profile:
|
||||
# - display current AWS_PROFILE name
|
||||
# - displays yellow on red if profile name contains 'production' or
|
||||
# ends in '-prod'
|
||||
# - displays black on green otherwise
|
||||
prompt_aws() {
|
||||
[[ -z "$AWS_PROFILE" || "$SHOW_AWS_PROMPT" = false ]] && return
|
||||
case "$AWS_PROFILE" in
|
||||
*-prod|*production*) prompt_segment red yellow "AWS: ${AWS_PROFILE:gs/%/%%}" ;;
|
||||
*) prompt_segment green black "AWS: ${AWS_PROFILE:gs/%/%%}" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
## Main prompt
|
||||
build_prompt() {
|
||||
RETVAL=$?
|
||||
prompt_status
|
||||
prompt_virtualenv
|
||||
prompt_aws
|
||||
prompt_context
|
||||
prompt_dir
|
||||
prompt_git
|
||||
prompt_bzr
|
||||
prompt_hg
|
||||
prompt_end
|
||||
}
|
||||
|
||||
PROMPT='%{%f%b%k%}$(build_prompt) '
|
24
dot_oh-my-zsh/themes/alanpeabody.zsh-theme
Normal file
24
dot_oh-my-zsh/themes/alanpeabody.zsh-theme
Normal file
|
@ -0,0 +1,24 @@
|
|||
|
||||
local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}'
|
||||
local pwd='%{$fg[blue]%}%~%{$reset_color%}'
|
||||
local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})'
|
||||
local git_branch='$(git_prompt_status)%{$reset_color%}$(git_prompt_info)%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
|
||||
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[green]%}‹"
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
|
||||
|
||||
PROMPT="${user} ${pwd}$ "
|
||||
RPROMPT="${return_code} ${git_branch} \$(ruby_prompt_info)"
|
24
dot_oh-my-zsh/themes/amuse.zsh-theme
Normal file
24
dot_oh-my-zsh/themes/amuse.zsh-theme
Normal file
|
@ -0,0 +1,24 @@
|
|||
# vim:ft=zsh ts=2 sw=2 sts=2
|
||||
|
||||
# Must use Powerline font, for \uE0A0 to render.
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}\uE0A0 "
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg_bold[red]%}‹"
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
|
||||
|
||||
PROMPT='
|
||||
%{$fg_bold[green]%}%~%{$reset_color%}$(git_prompt_info)$(virtualenv_prompt_info) ⌚ %{$fg_bold[red]%}%*%{$reset_color%}
|
||||
$ '
|
||||
|
||||
RPROMPT='$(ruby_prompt_info)'
|
||||
|
||||
VIRTUAL_ENV_DISABLE_PROMPT=0
|
||||
ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX=" %{$fg[green]%}🐍 "
|
||||
ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_VIRTUALENV_PREFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX
|
||||
ZSH_THEME_VIRTUALENV_SUFFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX
|
||||
|
24
dot_oh-my-zsh/themes/apple.zsh-theme
Normal file
24
dot_oh-my-zsh/themes/apple.zsh-theme
Normal file
|
@ -0,0 +1,24 @@
|
|||
function toon {
|
||||
echo -n ""
|
||||
}
|
||||
|
||||
autoload -Uz vcs_info
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes
|
||||
zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes
|
||||
zstyle ':vcs_info:*' actionformats '%F{5}[%F{2}%b%F{3}|%F{1}%a%c%u%F{5}]%f '
|
||||
zstyle ':vcs_info:*' formats '%F{5}[%F{2}%b%c%u%F{5}]%f '
|
||||
zstyle ':vcs_info:svn:*' branchformat '%b'
|
||||
zstyle ':vcs_info:svn:*' actionformats '%F{5}[%F{2}%b%F{1}:%F{3}%i%F{3}|%F{1}%a%c%u%F{5}]%f '
|
||||
zstyle ':vcs_info:svn:*' formats '%F{5}[%F{2}%b%F{1}:%F{3}%i%c%u%F{5}]%f '
|
||||
zstyle ':vcs_info:*' enable git cvs svn
|
||||
|
||||
theme_precmd () {
|
||||
vcs_info
|
||||
}
|
||||
|
||||
setopt prompt_subst
|
||||
PROMPT='%{$fg[magenta]%}$(toon)%{$reset_color%} %~/ %{$reset_color%}${vcs_info_msg_0_}%{$reset_color%}'
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook precmd theme_precmd
|
14
dot_oh-my-zsh/themes/arrow.zsh-theme
Normal file
14
dot_oh-my-zsh/themes/arrow.zsh-theme
Normal file
|
@ -0,0 +1,14 @@
|
|||
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="yellow"; fi
|
||||
|
||||
PROMPT='%{$fg[$NCOLOR]%}%c ➤ %{$reset_color%}'
|
||||
RPROMPT='%{$fg[$NCOLOR]%} $(git_prompt_info)%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="git:"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="*"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# See https://geoff.greer.fm/lscolors/
|
||||
export LSCOLORS="exfxcxdxbxbxbxbxbxbxbx"
|
||||
export LS_COLORS="di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=31;40:cd=31;40:su=31;40:sg=31;40:tw=31;40:ow=31;40:"
|
||||
|
8
dot_oh-my-zsh/themes/aussiegeek.zsh-theme
Normal file
8
dot_oh-my-zsh/themes/aussiegeek.zsh-theme
Normal file
|
@ -0,0 +1,8 @@
|
|||
PROMPT="%{${fg_bold[blue]}%}[ %{${fg[red]}%}%t %{${fg_bold[blue]}%}] %{${fg_bold[blue]}%} [ %{${fg[red]}%}%n@%m:%~\$(git_prompt_info)%{${fg[yellow]}%}\$(ruby_prompt_info)%{${fg_bold[blue]}%} ]%{$reset_color%}
|
||||
$ "
|
||||
|
||||
# git theming
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{${fg_bold[green]}%}("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="✔"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="✗"
|
90
dot_oh-my-zsh/themes/avit.zsh-theme
Normal file
90
dot_oh-my-zsh/themes/avit.zsh-theme
Normal file
|
@ -0,0 +1,90 @@
|
|||
# AVIT ZSH Theme
|
||||
|
||||
# settings
|
||||
typeset +H _current_dir="%{$fg_bold[blue]%}%3~%{$reset_color%} "
|
||||
typeset +H _return_status="%{$fg_bold[red]%}%(?..⍉)%{$reset_color%}"
|
||||
typeset +H _hist_no="%{$fg[grey]%}%h%{$reset_color%}"
|
||||
|
||||
PROMPT='
|
||||
$(_user_host)${_current_dir} $(git_prompt_info) $(ruby_prompt_info)
|
||||
%{%(!.${fg[red]}.${fg[white]})%}▶%{$reset_color%} '
|
||||
|
||||
PROMPT2='%{%(!.${fg[red]}.${fg[white]})%}◀%{$reset_color%} '
|
||||
|
||||
__RPROMPT='$(vi_mode_prompt_info)%{$(echotc UP 1)%}$(_git_time_since_commit) $(git_prompt_status) ${_return_status}%{$(echotc DO 1)%}'
|
||||
if [[ -z $RPROMPT ]]; then
|
||||
RPROMPT=$__RPROMPT
|
||||
else
|
||||
RPROMPT="${RPROMPT} ${__RPROMPT}"
|
||||
fi
|
||||
|
||||
function _user_host() {
|
||||
local me
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
me="%n@%m"
|
||||
elif [[ $LOGNAME != $USERNAME ]]; then
|
||||
me="%n"
|
||||
fi
|
||||
if [[ -n $me ]]; then
|
||||
echo "%{$fg[cyan]%}$me%{$reset_color%}:"
|
||||
fi
|
||||
}
|
||||
|
||||
# Determine the time since last commit. If branch is clean,
|
||||
# use a neutral color, otherwise colors will vary according to time.
|
||||
function _git_time_since_commit() {
|
||||
local last_commit now seconds_since_last_commit
|
||||
local minutes hours days years commit_age
|
||||
# Only proceed if there is actually a commit.
|
||||
if last_commit=$(command git -c log.showSignature=false log --format='%at' -1 2>/dev/null); then
|
||||
now=$(date +%s)
|
||||
seconds_since_last_commit=$((now-last_commit))
|
||||
|
||||
# Totals
|
||||
minutes=$((seconds_since_last_commit / 60))
|
||||
hours=$((minutes / 60))
|
||||
days=$((hours / 24))
|
||||
years=$((days / 365))
|
||||
|
||||
if [[ $years -gt 0 ]]; then
|
||||
commit_age="${years}y$((days % 365 ))d"
|
||||
elif [[ $days -gt 0 ]]; then
|
||||
commit_age="${days}d$((hours % 24))h"
|
||||
elif [[ $hours -gt 0 ]]; then
|
||||
commit_age+="${hours}h$(( minutes % 60 ))m"
|
||||
else
|
||||
commit_age="${minutes}m"
|
||||
fi
|
||||
|
||||
echo "${ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL}${commit_age}%{$reset_color%}"
|
||||
fi
|
||||
}
|
||||
|
||||
MODE_INDICATOR="%{$fg_bold[yellow]%}❮%{$reset_color%}%{$fg[yellow]%}❮❮%{$reset_color%}"
|
||||
|
||||
# Git prompt settings
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}✚ "
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%}⚑ "
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%}✖ "
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%}▴ "
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[cyan]%}§ "
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[white]%}◒ "
|
||||
|
||||
# Ruby prompt settings
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[grey]%}"
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
|
||||
# Colors vary depending on time lapsed.
|
||||
ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM="%{$fg[yellow]%}"
|
||||
ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG="%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[white]%}"
|
||||
|
||||
# LS colors, made with https://geoff.greer.fm/lscolors/
|
||||
export LSCOLORS="exfxcxdxbxegedabagacad"
|
||||
export LS_COLORS='di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:'
|
||||
export GREP_COLORS='mt=1;33'
|
16
dot_oh-my-zsh/themes/awesomepanda.zsh-theme
Normal file
16
dot_oh-my-zsh/themes/awesomepanda.zsh-theme
Normal file
|
@ -0,0 +1,16 @@
|
|||
# the svn plugin has to be activated for this to work.
|
||||
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
|
||||
PROMPT='${ret_status}%{$fg_bold[green]%} %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}$(svn_prompt_info)%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})%{$fg[yellow]%} ✗ %{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}) "
|
||||
|
||||
ZSH_PROMPT_BASE_COLOR="%{$fg_bold[blue]%}"
|
||||
ZSH_THEME_REPO_NAME_COLOR="%{$fg_bold[red]%}"
|
||||
|
||||
ZSH_THEME_SVN_PROMPT_PREFIX="svn:("
|
||||
ZSH_THEME_SVN_PROMPT_SUFFIX=")"
|
||||
ZSH_THEME_SVN_PROMPT_DIRTY="%{$fg[red]%} ✘ %{$reset_color%}"
|
||||
ZSH_THEME_SVN_PROMPT_CLEAN=" "
|
38
dot_oh-my-zsh/themes/bira.zsh-theme
Normal file
38
dot_oh-my-zsh/themes/bira.zsh-theme
Normal file
|
@ -0,0 +1,38 @@
|
|||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
local user_host="%B%(!.%{$fg[red]%}.%{$fg[green]%})%n@%m%{$reset_color%} "
|
||||
local user_symbol='%(!.#.$)'
|
||||
local current_dir="%B%{$fg[blue]%}%~ %{$reset_color%}"
|
||||
local conda_prompt='$(conda_prompt_info)'
|
||||
|
||||
local vcs_branch='$(git_prompt_info)$(hg_prompt_info)'
|
||||
local rvm_ruby='$(ruby_prompt_info)'
|
||||
local venv_prompt='$(virtualenv_prompt_info)'
|
||||
if [[ "${plugins[@]}" =~ 'kube-ps1' ]]; then
|
||||
local kube_prompt='$(kube_ps1)'
|
||||
else
|
||||
local kube_prompt=''
|
||||
fi
|
||||
|
||||
ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
|
||||
|
||||
PROMPT="╭─${conda_prompt}${user_host}${current_dir}${rvm_ruby}${vcs_branch}${venv_prompt}${kube_prompt}
|
||||
╰─%B${user_symbol}%b "
|
||||
RPROMPT="%B${return_code}%b"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$fg[yellow]%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[yellow]%}"
|
||||
|
||||
ZSH_THEME_HG_PROMPT_PREFIX="$ZSH_THEME_GIT_PROMPT_PREFIX"
|
||||
ZSH_THEME_HG_PROMPT_SUFFIX="$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
ZSH_THEME_HG_PROMPT_DIRTY="$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||
ZSH_THEME_HG_PROMPT_CLEAN="$ZSH_THEME_GIT_PROMPT_CLEAN"
|
||||
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}‹"
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="› %{$reset_color%}"
|
||||
|
||||
ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX="%{$fg[green]%}‹"
|
||||
ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX="› %{$reset_color%}"
|
||||
ZSH_THEME_VIRTUALENV_PREFIX="$ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX"
|
||||
ZSH_THEME_VIRTUALENV_SUFFIX="$ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX"
|
30
dot_oh-my-zsh/themes/blinks.zsh-theme
Normal file
30
dot_oh-my-zsh/themes/blinks.zsh-theme
Normal file
|
@ -0,0 +1,30 @@
|
|||
# https://github.com/blinks zsh theme
|
||||
|
||||
function _prompt_char() {
|
||||
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
|
||||
echo "%{%F{blue}%}±%{%f%k%b%}"
|
||||
else
|
||||
echo ' '
|
||||
fi
|
||||
}
|
||||
|
||||
# This theme works with both the "dark" and "light" variants of the
|
||||
# Solarized color schema. Set the SOLARIZED_THEME variable to one of
|
||||
# these two values to choose. If you don't specify, we'll assume you're
|
||||
# using the "dark" variant.
|
||||
|
||||
case ${SOLARIZED_THEME:-dark} in
|
||||
light) bkg=white;;
|
||||
*) bkg=black;;
|
||||
esac
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" [%{%B%F{blue}%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{%f%k%b%K{${bkg}}%B%F{green}%}]"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{%F{red}%}*%{%f%k%b%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
PROMPT='%{%f%k%b%}
|
||||
%{%K{${bkg}}%B%F{green}%}%n%{%B%F{blue}%}@%{%B%F{cyan}%}%m%{%B%F{green}%} %{%b%F{yellow}%K{${bkg}}%}%~%{%B%F{green}%}$(git_prompt_info)%E%{%f%k%b%}
|
||||
%{%K{${bkg}}%}$(_prompt_char)%{%K{${bkg}}%} %#%{%f%k%b%} '
|
||||
|
||||
RPROMPT='!%{%B%F{cyan}%}%!%{%f%k%b%}'
|
133
dot_oh-my-zsh/themes/bureau.zsh-theme
Normal file
133
dot_oh-my-zsh/themes/bureau.zsh-theme
Normal file
|
@ -0,0 +1,133 @@
|
|||
# oh-my-zsh Bureau Theme
|
||||
|
||||
### NVM
|
||||
|
||||
ZSH_THEME_NVM_PROMPT_PREFIX="%B⬡%b "
|
||||
ZSH_THEME_NVM_PROMPT_SUFFIX=""
|
||||
|
||||
### Git [±master ▾●]
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="[%{$fg_bold[green]%}±%{$reset_color%}%{$fg_bold[white]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}✓%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[cyan]%}▴%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg[magenta]%}▾%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_bold[green]%}●%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg_bold[yellow]%}●%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[red]%}●%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_STASHED="(%{$fg_bold[blue]%}✹%{$reset_color%})"
|
||||
|
||||
bureau_git_info () {
|
||||
local ref
|
||||
ref=$(command git symbolic-ref HEAD 2> /dev/null) || \
|
||||
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
|
||||
echo "${ref#refs/heads/}"
|
||||
}
|
||||
|
||||
bureau_git_status() {
|
||||
local result gitstatus
|
||||
gitstatus="$(command git status --porcelain -b 2>/dev/null)"
|
||||
|
||||
# check status of files
|
||||
local gitfiles="$(tail -n +2 <<< "$gitstatus")"
|
||||
if [[ -n "$gitfiles" ]]; then
|
||||
if [[ "$gitfiles" =~ $'(^|\n)[AMRD]. ' ]]; then
|
||||
result+="$ZSH_THEME_GIT_PROMPT_STAGED"
|
||||
fi
|
||||
if [[ "$gitfiles" =~ $'(^|\n).[MTD] ' ]]; then
|
||||
result+="$ZSH_THEME_GIT_PROMPT_UNSTAGED"
|
||||
fi
|
||||
if [[ "$gitfiles" =~ $'(^|\n)\\?\\? ' ]]; then
|
||||
result+="$ZSH_THEME_GIT_PROMPT_UNTRACKED"
|
||||
fi
|
||||
if [[ "$gitfiles" =~ $'(^|\n)UU ' ]]; then
|
||||
result+="$ZSH_THEME_GIT_PROMPT_UNMERGED"
|
||||
fi
|
||||
else
|
||||
result+="$ZSH_THEME_GIT_PROMPT_CLEAN"
|
||||
fi
|
||||
|
||||
# check status of local repository
|
||||
local gitbranch="$(head -n 1 <<< "$gitstatus")"
|
||||
if [[ "$gitbranch" =~ '^## .*ahead' ]]; then
|
||||
result+="$ZSH_THEME_GIT_PROMPT_AHEAD"
|
||||
fi
|
||||
if [[ "$gitbranch" =~ '^## .*behind' ]]; then
|
||||
result+="$ZSH_THEME_GIT_PROMPT_BEHIND"
|
||||
fi
|
||||
if [[ "$gitbranch" =~ '^## .*diverged' ]]; then
|
||||
result+="$ZSH_THEME_GIT_PROMPT_DIVERGED"
|
||||
fi
|
||||
|
||||
# check if there are stashed changes
|
||||
if command git rev-parse --verify refs/stash &> /dev/null; then
|
||||
result+="$ZSH_THEME_GIT_PROMPT_STASHED"
|
||||
fi
|
||||
|
||||
echo $result
|
||||
}
|
||||
|
||||
bureau_git_prompt() {
|
||||
# ignore non git folders and hidden repos (adapted from lib/git.zsh)
|
||||
if ! command git rev-parse --git-dir &> /dev/null \
|
||||
|| [[ "$(command git config --get oh-my-zsh.hide-info 2>/dev/null)" == 1 ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# check git information
|
||||
local gitinfo=$(bureau_git_info)
|
||||
if [[ -z "$gitinfo" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# quote % in git information
|
||||
local output="${gitinfo:gs/%/%%}"
|
||||
|
||||
# check git status
|
||||
local gitstatus=$(bureau_git_status)
|
||||
if [[ -n "$gitstatus" ]]; then
|
||||
output+=" $gitstatus"
|
||||
fi
|
||||
|
||||
echo "${ZSH_THEME_GIT_PROMPT_PREFIX}${output}${ZSH_THEME_GIT_PROMPT_SUFFIX}"
|
||||
}
|
||||
|
||||
|
||||
_PATH="%{$fg_bold[white]%}%~%{$reset_color%}"
|
||||
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
_USERNAME="%{$fg_bold[red]%}%n"
|
||||
_LIBERTY="%{$fg[red]%}#"
|
||||
else
|
||||
_USERNAME="%{$fg_bold[white]%}%n"
|
||||
_LIBERTY="%{$fg[green]%}$"
|
||||
fi
|
||||
_USERNAME="$_USERNAME%{$reset_color%}@%m"
|
||||
_LIBERTY="$_LIBERTY%{$reset_color%}"
|
||||
|
||||
|
||||
get_space () {
|
||||
local STR=$1$2
|
||||
local zero='%([BSUbfksu]|([FB]|){*})'
|
||||
local LENGTH=${#${(S%%)STR//$~zero/}}
|
||||
local SPACES=$(( COLUMNS - LENGTH - ${ZLE_RPROMPT_INDENT:-1} ))
|
||||
|
||||
(( SPACES > 0 )) || return
|
||||
printf ' %.0s' {1..$SPACES}
|
||||
}
|
||||
|
||||
_1LEFT="$_USERNAME $_PATH"
|
||||
_1RIGHT="[%*]"
|
||||
|
||||
bureau_precmd () {
|
||||
_1SPACES=`get_space $_1LEFT $_1RIGHT`
|
||||
print
|
||||
print -rP "$_1LEFT$_1SPACES$_1RIGHT"
|
||||
}
|
||||
|
||||
setopt prompt_subst
|
||||
PROMPT='> $_LIBERTY '
|
||||
RPROMPT='$(nvm_prompt_info) $(bureau_git_prompt)'
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook precmd bureau_precmd
|
34
dot_oh-my-zsh/themes/candy-kingdom.zsh-theme
Normal file
34
dot_oh-my-zsh/themes/candy-kingdom.zsh-theme
Normal file
|
@ -0,0 +1,34 @@
|
|||
if ! hg prompt 2>/dev/null; then
|
||||
function hg_prompt_info { }
|
||||
else
|
||||
function hg_prompt_info {
|
||||
hg prompt --angle-brackets "\
|
||||
< on %{$fg[magenta]%}<branch>%{$reset_color%}>\
|
||||
< at %{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
|
||||
%{$fg[green]%}<status|modified|unknown><update>%{$reset_color%}<
|
||||
patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
|
||||
}
|
||||
fi
|
||||
|
||||
function box_name {
|
||||
local box="${SHORT_HOST:-$HOST}"
|
||||
[[ -f ~/.box-name ]] && box="$(< ~/.box-name)"
|
||||
echo "${box:gs/%/%%}"
|
||||
}
|
||||
|
||||
PROMPT='
|
||||
%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{$fg_bold[green]%}%~%{$reset_color%}$(hg_prompt_info)$(git_prompt_info)
|
||||
%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )$ '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[magenta]%}branch: "
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[red]%}?"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[orange]%}!"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
|
||||
|
||||
RPROMPT='%{$fg[red]%}%(?..✘)%{$reset_color%}'
|
||||
|
||||
# Add battery status if the battery plugin is enabled
|
||||
if (( $+functions[battery_pct_prompt] )); then
|
||||
RPROMPT+='$(battery_time_remaining) $(battery_pct_prompt)%{$reset_color%}'
|
||||
fi
|
7
dot_oh-my-zsh/themes/candy.zsh-theme
Normal file
7
dot_oh-my-zsh/themes/candy.zsh-theme
Normal file
|
@ -0,0 +1,7 @@
|
|||
PROMPT=$'%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%X]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\
|
||||
%{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}["
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
14
dot_oh-my-zsh/themes/clean.zsh-theme
Normal file
14
dot_oh-my-zsh/themes/clean.zsh-theme
Normal file
|
@ -0,0 +1,14 @@
|
|||
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="white"; fi
|
||||
|
||||
PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) '
|
||||
RPROMPT='[%*]'
|
||||
|
||||
# git theming
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[yellow]%}%B"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✗"
|
||||
|
||||
# LS colors, made with https://geoff.greer.fm/lscolors/
|
||||
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
|
10
dot_oh-my-zsh/themes/cloud.zsh-theme
Normal file
10
dot_oh-my-zsh/themes/cloud.zsh-theme
Normal file
|
@ -0,0 +1,10 @@
|
|||
if [[ -z $ZSH_THEME_CLOUD_PREFIX ]]; then
|
||||
ZSH_THEME_CLOUD_PREFIX='☁'
|
||||
fi
|
||||
|
||||
PROMPT='%{$fg_bold[cyan]%}$ZSH_THEME_CLOUD_PREFIX %{$fg_bold[green]%} %{$fg[green]%}%c %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}⚡ %{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]"
|
8
dot_oh-my-zsh/themes/crcandy.zsh-theme
Normal file
8
dot_oh-my-zsh/themes/crcandy.zsh-theme
Normal file
|
@ -0,0 +1,8 @@
|
|||
PROMPT=$'
|
||||
%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%H:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\
|
||||
%{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}["
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
39
dot_oh-my-zsh/themes/crunch.zsh-theme
Normal file
39
dot_oh-my-zsh/themes/crunch.zsh-theme
Normal file
|
@ -0,0 +1,39 @@
|
|||
# CRUNCH - created from Steve Eley's cat waxing.
|
||||
# Initially hacked from the Dallas theme. Thanks, Dallas Reedy.
|
||||
#
|
||||
# This theme assumes you do most of your oh-my-zsh'ed "colorful" work at a single machine,
|
||||
# and eschews the standard space-consuming user and hostname info. Instead, only the
|
||||
# things that vary in my own workflow are shown:
|
||||
#
|
||||
# * The time (not the date)
|
||||
# * The RVM version and gemset (omitting the 'ruby' name if it's MRI)
|
||||
# * The current directory
|
||||
# * The Git branch and its 'dirty' state
|
||||
#
|
||||
# Colors are at the top so you can mess with those separately if you like.
|
||||
# For the most part I stuck with Dallas's.
|
||||
|
||||
CRUNCH_BRACKET_COLOR="%{$fg[white]%}"
|
||||
CRUNCH_TIME_COLOR="%{$fg[yellow]%}"
|
||||
CRUNCH_RVM_COLOR="%{$fg[magenta]%}"
|
||||
CRUNCH_DIR_COLOR="%{$fg[cyan]%}"
|
||||
CRUNCH_GIT_BRANCH_COLOR="%{$fg[green]%}"
|
||||
CRUNCH_GIT_CLEAN_COLOR="%{$fg[green]%}"
|
||||
CRUNCH_GIT_DIRTY_COLOR="%{$fg[red]%}"
|
||||
|
||||
# These Git variables are used by the oh-my-zsh git_prompt_info helper:
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="$CRUNCH_BRACKET_COLOR:$CRUNCH_GIT_BRANCH_COLOR"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=" $CRUNCH_GIT_CLEAN_COLOR✓"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" $CRUNCH_GIT_DIRTY_COLOR✗"
|
||||
|
||||
# Our elements:
|
||||
CRUNCH_TIME_="$CRUNCH_BRACKET_COLOR{$CRUNCH_TIME_COLOR%T$CRUNCH_BRACKET_COLOR}%{$reset_color%}"
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR"
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}"
|
||||
CRUNCH_RVM_='$(ruby_prompt_info)'
|
||||
CRUNCH_DIR_="$CRUNCH_DIR_COLOR%~\$(git_prompt_info) "
|
||||
CRUNCH_PROMPT="$CRUNCH_BRACKET_COLOR➭ "
|
||||
|
||||
# Put it all together!
|
||||
PROMPT="$CRUNCH_TIME_$CRUNCH_RVM_$CRUNCH_DIR_$CRUNCH_PROMPT%{$reset_color%}"
|
4
dot_oh-my-zsh/themes/cypher.zsh-theme
Normal file
4
dot_oh-my-zsh/themes/cypher.zsh-theme
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Based on evan's prompt
|
||||
# Shows the exit status of the last command if non-zero
|
||||
# Uses "#" instead of "»" when running with elevated privileges
|
||||
PROMPT="%m %{${fg_bold[red]}%}:: %{${fg[green]}%}%3~%(0?. . %{${fg[red]}%}%? )%{${fg[blue]}%}»%{${reset_color}%} "
|
27
dot_oh-my-zsh/themes/dallas.zsh-theme
Normal file
27
dot_oh-my-zsh/themes/dallas.zsh-theme
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Personalized!
|
||||
|
||||
# Grab the current date (%D) and time (%T) wrapped in {}: {%D %T}
|
||||
DALLAS_CURRENT_TIME_="%{$fg[white]%}{%{$fg[yellow]%}%D %T%{$fg[white]%}}%{$reset_color%}"
|
||||
# Grab the current machine name: muscato
|
||||
DALLAS_CURRENT_MACH_="%{$fg[green]%}%m%{$fg[white]%}:%{$reset_color%}"
|
||||
# Grab the current filepath, use shortcuts: ~/Desktop
|
||||
# Append the current git branch, if in a git repository: ~aw@master
|
||||
DALLAS_CURRENT_LOCA_="%{$fg[cyan]%}%~\$(git_prompt_info)%{$reset_color%}\$(parse_git_dirty)"
|
||||
# Grab the current username: dallas
|
||||
DALLAS_CURRENT_USER_="%{$fg[red]%}%n%{$reset_color%}"
|
||||
# Use a % for normal users and a # for privileged (root) users.
|
||||
DALLAS_PROMPT_CHAR_="%{$fg[white]%}%(!.#.%%)%{$reset_color%}"
|
||||
# For the git prompt, use a white @ and blue text for the branch name
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}@%{$fg[blue]%}"
|
||||
# Close it all off by resetting the color and styles.
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
# Do nothing if the branch is clean (no changes).
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
# Add 3 cyan ✗s if this branch is diiirrrty! Dirty branch!
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[cyan]%}✗✗✗"
|
||||
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[white]%}[%{$fg[magenta]%}"
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="%{$fg[white]%}]%{$reset_color%}"
|
||||
|
||||
# Put it all together!
|
||||
PROMPT="$DALLAS_CURRENT_TIME_\$(ruby_prompt_info)$DALLAS_CURRENT_MACH_$DALLAS_CURRENT_LOCA_ $DALLAS_CURRENT_USER_$DALLAS_PROMPT_CHAR_ "
|
9
dot_oh-my-zsh/themes/darkblood.zsh-theme
Normal file
9
dot_oh-my-zsh/themes/darkblood.zsh-theme
Normal file
|
@ -0,0 +1,9 @@
|
|||
# meh. Dark Blood Rewind, a new beginning.
|
||||
|
||||
PROMPT=$'%{$fg[red]%}┌[%{$fg_bold[white]%}%n%{$reset_color%}%{$fg[red]%}@%{$fg_bold[white]%}%m%{$reset_color%}%{$fg[red]%}] [%{$fg_bold[white]%}/dev/%y%{$reset_color%}%{$fg[red]%}] %{$(git_prompt_info)%}%(?,,%{$fg[red]%}[%{$fg_bold[white]%}%?%{$reset_color%}%{$fg[red]%}])
|
||||
%{$fg[red]%}└[%{$fg_bold[white]%}%~%{$reset_color%}%{$fg[red]%}]>%{$reset_color%} '
|
||||
PS2=$' %{$fg[red]%}|>%{$reset_color%} '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}[%{$fg_bold[white]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}%{$fg[red]%}] "
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}⚡%{$reset_color%}"
|
7
dot_oh-my-zsh/themes/daveverwer.zsh-theme
Normal file
7
dot_oh-my-zsh/themes/daveverwer.zsh-theme
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Copied and modified from the oh-my-zsh theme from geoffgarside
|
||||
# Red server name, green cwd, blue git status
|
||||
|
||||
PROMPT='%{$fg[red]%}%m%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(git_prompt_info) %(!.#.$) '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
|
56
dot_oh-my-zsh/themes/dieter.zsh-theme
Normal file
56
dot_oh-my-zsh/themes/dieter.zsh-theme
Normal file
|
@ -0,0 +1,56 @@
|
|||
# the idea of this theme is to contain a lot of info in a small string, by
|
||||
# compressing some parts and colorcoding, which bring useful visual cues,
|
||||
# while limiting the amount of colors and such to keep it easy on the eyes.
|
||||
# When a command exited >0, the timestamp will be in red and the exit code
|
||||
# will be on the right edge.
|
||||
# The exit code visual cues will only display once.
|
||||
# (i.e. they will be reset, even if you hit enter a few times on empty command prompts)
|
||||
|
||||
typeset -g -A host_repr
|
||||
|
||||
# translate hostnames into shortened, colorcoded strings
|
||||
host_repr=('dieter-ws-a7n8x-arch' "%{$fg_bold[green]%}ws" 'dieter-p4sci-arch' "%{$fg_bold[blue]%}p4")
|
||||
|
||||
# local time, color coded by last return code
|
||||
time_enabled="%(?.%{$fg[green]%}.%{$fg[red]%})%*%{$reset_color%}"
|
||||
time_disabled="%{$fg[green]%}%*%{$reset_color%}"
|
||||
time=$time_enabled
|
||||
|
||||
# user part, color coded by privileges
|
||||
local user="%(!.%{$fg[blue]%}.%{$fg[blue]%})%n%{$reset_color%}"
|
||||
|
||||
# Hostname part. compressed and colorcoded per host_repr array
|
||||
# if not found, regular hostname in default color
|
||||
local host="@${host_repr[$HOST]:-$HOST}%{$reset_color%}"
|
||||
|
||||
# Compacted $PWD
|
||||
local pwd="%{$fg[blue]%}%c%{$reset_color%}"
|
||||
|
||||
PROMPT='${time} ${user}${host} ${pwd} $(git_prompt_info)'
|
||||
|
||||
# i would prefer 1 icon that shows the "most drastic" deviation from HEAD,
|
||||
# but lets see how this works out
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%} %{$fg[yellow]%}?%{$fg[green]%}%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}"
|
||||
|
||||
# elaborate exitcode on the right when >0
|
||||
return_code_enabled="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
return_code_disabled=
|
||||
return_code=$return_code_enabled
|
||||
|
||||
RPS1='${return_code}'
|
||||
|
||||
function accept-line-or-clear-warning () {
|
||||
if [[ -z $BUFFER ]]; then
|
||||
time=$time_disabled
|
||||
return_code=$return_code_disabled
|
||||
else
|
||||
time=$time_enabled
|
||||
return_code=$return_code_enabled
|
||||
fi
|
||||
zle accept-line
|
||||
}
|
||||
zle -N accept-line-or-clear-warning
|
||||
bindkey '^M' accept-line-or-clear-warning
|
77
dot_oh-my-zsh/themes/dogenpunk.zsh-theme
Normal file
77
dot_oh-my-zsh/themes/dogenpunk.zsh-theme
Normal file
|
@ -0,0 +1,77 @@
|
|||
# dogenpunk.zsh-theme
|
||||
|
||||
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
|
||||
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
|
||||
|
||||
PROMPT='%{$fg[blue]%}%m%{$reset_color%}%{$fg_bold[white]%} ॐ %{$reset_color%}%{$fg[cyan]%}%~:%{$reset_color%}$(git_time_since_commit)$(git_prompt_info)
|
||||
%{$fg[red]%}%!%{$reset_color%} $(prompt_char) '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%}git%{$reset_color%}@%{$bg[white]%}%{$fg[black]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
RPROMPT='${return_status}$(git_prompt_status)%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
|
||||
|
||||
function prompt_char() {
|
||||
git branch >/dev/null 2>/dev/null && echo "%{$fg[green]%}±%{$reset_color%}" && return
|
||||
hg root >/dev/null 2>/dev/null && echo "%{$fg_bold[red]%}☿%{$reset_color%}" && return
|
||||
echo "%{$fg[cyan]%}◯ %{$reset_color%}"
|
||||
}
|
||||
|
||||
# Colors vary depending on time lapsed.
|
||||
ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM="%{$fg[yellow]%}"
|
||||
ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG="%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[cyan]%}"
|
||||
|
||||
# Determine the time since last commit. If branch is clean,
|
||||
# use a neutral color, otherwise colors will vary according to time.
|
||||
function git_time_since_commit() {
|
||||
if git rev-parse --git-dir > /dev/null 2>&1; then
|
||||
# Only proceed if there is actually a commit.
|
||||
if last_commit=`git -c log.showSignature=false log --pretty=format:'%at' -1 2> /dev/null`; then
|
||||
now=`date +%s`
|
||||
seconds_since_last_commit=$((now-last_commit))
|
||||
|
||||
# Totals
|
||||
MINUTES=$((seconds_since_last_commit / 60))
|
||||
HOURS=$((seconds_since_last_commit/3600))
|
||||
|
||||
# Sub-hours and sub-minutes
|
||||
DAYS=$((seconds_since_last_commit / 86400))
|
||||
SUB_HOURS=$((HOURS % 24))
|
||||
SUB_MINUTES=$((MINUTES % 60))
|
||||
|
||||
if [[ -n $(git status -s 2> /dev/null) ]]; then
|
||||
if [ "$MINUTES" -gt 30 ]; then
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG"
|
||||
elif [ "$MINUTES" -gt 10 ]; then
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM"
|
||||
else
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT"
|
||||
fi
|
||||
else
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL"
|
||||
fi
|
||||
|
||||
if [ "$HOURS" -gt 24 ]; then
|
||||
echo "($COLOR${DAYS}d${SUB_HOURS}h${SUB_MINUTES}m%{$reset_color%}|"
|
||||
elif [ "$MINUTES" -gt 60 ]; then
|
||||
echo "($COLOR${HOURS}h${SUB_MINUTES}m%{$reset_color%}|"
|
||||
else
|
||||
echo "($COLOR${MINUTES}m%{$reset_color%}|"
|
||||
fi
|
||||
else
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL"
|
||||
echo "($COLOR~|"
|
||||
fi
|
||||
fi
|
||||
}
|
14
dot_oh-my-zsh/themes/dpoggi.zsh-theme
Normal file
14
dot_oh-my-zsh/themes/dpoggi.zsh-theme
Normal file
|
@ -0,0 +1,14 @@
|
|||
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
PROMPT='%{$fg[$NCOLOR]%}%n%{$reset_color%}@%{$fg[cyan]%}%m\
|
||||
%{$reset_color%}:%{$fg[magenta]%}%~\
|
||||
$(git_prompt_info) \
|
||||
%{$fg[red]%}%(!.#.»)%{$reset_color%} '
|
||||
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
||||
RPS1='${return_code}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}○%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}⚡%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%})%{$reset_color%}"
|
16
dot_oh-my-zsh/themes/dst.zsh-theme
Normal file
16
dot_oh-my-zsh/themes/dst.zsh-theme
Normal file
|
@ -0,0 +1,16 @@
|
|||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
function prompt_char {
|
||||
if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi
|
||||
}
|
||||
|
||||
PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%}
|
||||
)
|
||||
%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info)
|
||||
$(prompt_char) '
|
||||
|
||||
RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
|
19
dot_oh-my-zsh/themes/dstufft.zsh-theme
Normal file
19
dot_oh-my-zsh/themes/dstufft.zsh-theme
Normal file
|
@ -0,0 +1,19 @@
|
|||
function prompt_char {
|
||||
git branch >/dev/null 2>/dev/null && echo '±' && return
|
||||
hg root >/dev/null 2>/dev/null && echo 'Hg' && return
|
||||
echo '○'
|
||||
}
|
||||
|
||||
function virtualenv_info {
|
||||
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
|
||||
}
|
||||
|
||||
PROMPT='
|
||||
%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}%~%{$reset_color%}$(git_prompt_info)
|
||||
$(virtualenv_info)$(prompt_char) '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
7
dot_oh-my-zsh/themes/duellj.zsh-theme
Normal file
7
dot_oh-my-zsh/themes/duellj.zsh-theme
Normal file
|
@ -0,0 +1,7 @@
|
|||
# user, host, full path, and time/date
|
||||
# on two lines for easier vgrepping
|
||||
# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
|
||||
PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;34m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}%!%{\e[0;34m%}%B]%b%{\e[0m%}
|
||||
%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]%{\e[0m%}%b '
|
||||
RPROMPT='[%*]'
|
||||
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
|
23
dot_oh-my-zsh/themes/eastwood.zsh-theme
Normal file
23
dot_oh-my-zsh/themes/eastwood.zsh-theme
Normal file
|
@ -0,0 +1,23 @@
|
|||
# RVM settings
|
||||
if [[ -s ~/.rvm/scripts/rvm ]] ; then
|
||||
RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1"
|
||||
else
|
||||
if which rbenv &> /dev/null; then
|
||||
RPS1="%{$fg[yellow]%}rbenv:%{$reset_color%}%{$fg[red]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$reset_color%} $EPS1"
|
||||
fi
|
||||
fi
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}["
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# Customized git status, oh-my-zsh currently does not allow render dirty status before branch
|
||||
git_custom_status() {
|
||||
local cb=$(git_current_branch)
|
||||
if [ -n "$cb" ]; then
|
||||
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(git_current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
fi
|
||||
}
|
||||
|
||||
PROMPT='$(git_custom_status)%{$fg[cyan]%}[%~% ]%{$reset_color%}%B$%b '
|
6
dot_oh-my-zsh/themes/edvardm.zsh-theme
Normal file
6
dot_oh-my-zsh/themes/edvardm.zsh-theme
Normal file
|
@ -0,0 +1,6 @@
|
|||
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%} %{$fg_bold[white]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
113
dot_oh-my-zsh/themes/emotty.zsh-theme
Normal file
113
dot_oh-my-zsh/themes/emotty.zsh-theme
Normal file
|
@ -0,0 +1,113 @@
|
|||
#!/usr/bin/env zsh
|
||||
# ------------------------------------------------------------------------------
|
||||
# FILE: emotty.zsh-theme
|
||||
# DESCRIPTION: A varying emoji based theme
|
||||
# AUTHOR: Alexis Hildebrandt (afh[at]surryhill.net)
|
||||
# VERSION: 1.0.0
|
||||
# DEPENDS: emotty plugin
|
||||
# RECOMMENDS: Hasklig font
|
||||
#
|
||||
# This theme shows a different emoji for each tty at the main prompt.
|
||||
#
|
||||
# There are pre-defined different emoji sets to choose from, e.g.:
|
||||
# emoji, stellar, floral, zodiac, love (see emotty plugin).
|
||||
#
|
||||
# To choose a different emotty set than the default (emoji)
|
||||
# % export emotty_set=nature
|
||||
#
|
||||
# For the superuser (root) this theme shows a designated indicator
|
||||
# and switches the foreground color to red
|
||||
# (see root_prompt variable, default: skull).
|
||||
# But you are using sudo (8) instead of designated a root shell, right‽
|
||||
#
|
||||
# When logged in via SSH the main prompt also shows the user- and hostname.
|
||||
#
|
||||
# The exit status of the last failed command is displayed in the window title
|
||||
# along with an indicator (see warn_glyph variable, default: collision symbol).
|
||||
# To clear it just run: $NULL, true or :
|
||||
#
|
||||
# The right prompt shows the current working directory (3 levels up) in cyan.
|
||||
#
|
||||
# When in a git repository the main prompt shows the current branch name
|
||||
# with a branch indicator in yellow
|
||||
# (see vcs_branch_glyph variable, default: Hasklig branch glyph).
|
||||
#
|
||||
# If there are modified files the prompt switches to red and shows an unstaged
|
||||
# indicator (see vcs_unstaged_glyph variable, default: circled letter M).
|
||||
#
|
||||
# If there are staged files the prompt switches to green and shows an staged
|
||||
# indicator (see vcs_staged_glyph variable, default: high voltage sign).
|
||||
#
|
||||
# In a git repository the right prompt shows the repository name in bold and
|
||||
# prepends the current working directory subpath within the repository.
|
||||
#
|
||||
# When git currently performs an action such as merge or rebase, the action is
|
||||
# displayed in red instead of the branch name and a special action indicator
|
||||
# is shown (see vcs_action_glyph variable, default: chevron).
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
(( ${+functions[emotty]} )) || {
|
||||
echo "error: the emotty theme requires the emotty plugin" >&2
|
||||
return 1
|
||||
}
|
||||
|
||||
(( ${+emoji} )) || {
|
||||
echo "error: the emotty theme requires the emoji plugin" >&2
|
||||
return 1
|
||||
}
|
||||
|
||||
user_prompt="$(emotty)"
|
||||
root_prompt="$emoji[skull]"
|
||||
warn_prompt="$emoji[collision_symbol]"
|
||||
|
||||
vcs_unstaged_glyph="%{$emoji[circled_latin_capital_letter_m]$emoji2[emoji_style] %2G%}"
|
||||
vcs_staged_glyph="%{$emoji[high_voltage_sign]%2G%}"
|
||||
vcs_branch_glyph=$'\Ue0a0' #
|
||||
vcs_action_glyph=$'\U276f' # ❯
|
||||
|
||||
red="$FG[001]"
|
||||
yellow="$FG[003]"
|
||||
green="$FG[002]"
|
||||
cyan="$FG[014]"
|
||||
|
||||
prompt_glyph="%{%(#.${root_prompt}.${user_prompt}) %2G%}"
|
||||
|
||||
# Uncomment the next line if you also like to see the warn_prompt in the prompt on the right.
|
||||
#last_command_failed="%(?.. %F{red}%1{${warn_prompt} %1G%}%?%f)"
|
||||
|
||||
|
||||
setopt promptsubst
|
||||
|
||||
# Workaround for zsh 5.2 release (kudos to @timothybasanov)
|
||||
autoload +X VCS_INFO_nvcsformats
|
||||
functions[VCS_INFO_nvcsformats]=${functions[VCS_INFO_nvcsformats]/local -a msgs/}
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
autoload -Uz vcs_info
|
||||
|
||||
zstyle ':vcs_info:*' enable git #hg svn cvs
|
||||
zstyle ':vcs_info:*' get-revision false
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:git:*' unstagedstr "${red}${vcs_unstaged_glyph}"
|
||||
zstyle ':vcs_info:*' stagedstr "${green}${vcs_staged_glyph}"
|
||||
|
||||
# %(K|F){color} set (back|fore)ground color
|
||||
# %(k|f) reset (back|fore)ground color
|
||||
zstyle ':vcs_info:*' max-exports 3
|
||||
zstyle ':vcs_info:*' nvcsformats "${prompt_glyph}" '%3~' ''
|
||||
zstyle ':vcs_info:*' formats "${yellow}%u%c%b${vcs_branch_glyph}%f" '%S|' "$FX[bold]%r$FX[no-bold]"
|
||||
zstyle ':vcs_info:*' actionformats "${red}%K{white}%a${vcs_action_glyph}%k%f" '%S|' "$FX[bold]%r$FX[no-bold]"
|
||||
|
||||
red_if_root="%(!.%F{red}.)"
|
||||
sshuser_on_host="${SSH_TTY:+%(!.$red.$yellow)%n@%m$reset_color}"
|
||||
|
||||
PROMPT='${sshuser_on_host}${vcs_info_msg_0_}${red_if_root} '
|
||||
RPROMPT='${cyan}${vcs_info_msg_1_##.|}${vcs_info_msg_2_}%f${last_command_failed}'
|
||||
|
||||
emotty_title() {
|
||||
title "${${?/[^0]*/$warn_prompt $?}/0/${prompt_glyph}}"
|
||||
}
|
||||
add-zsh-hook precmd emotty_title
|
||||
add-zsh-hook precmd vcs_info
|
||||
|
||||
# vim:ft=zsh ts=2 sw=2 sts=2
|
36
dot_oh-my-zsh/themes/essembeh.zsh-theme
Normal file
36
dot_oh-my-zsh/themes/essembeh.zsh-theme
Normal file
|
@ -0,0 +1,36 @@
|
|||
# My custom theme:
|
||||
# - single line
|
||||
# - quite simple by default: user@host:$PWD
|
||||
# - green for local shell as non root
|
||||
# - red for ssh shell as non root
|
||||
# - magenta for root sessions
|
||||
# - prefix with remote address for ssh shells
|
||||
# - prefix to detect docker containers or chroot
|
||||
# - git plugin to display current branch and status
|
||||
|
||||
# git plugin
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[cyan]%}("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
|
||||
|
||||
|
||||
# by default, use green for user@host and no prefix
|
||||
local ZSH_ESSEMBEH_COLOR="green"
|
||||
local ZSH_ESSEMBEH_PREFIX=""
|
||||
if [[ -n "$SSH_CONNECTION" ]]; then
|
||||
# display the source address if connected via ssh
|
||||
ZSH_ESSEMBEH_PREFIX="%{$fg[yellow]%}[$(echo $SSH_CONNECTION | awk '{print $1}')]%{$reset_color%} "
|
||||
# use red color to highlight a remote connection
|
||||
ZSH_ESSEMBEH_COLOR="red"
|
||||
elif [[ -r /etc/debian_chroot ]]; then
|
||||
# prefix prompt in case of chroot
|
||||
ZSH_ESSEMBEH_PREFIX="%{$fg[yellow]%}[chroot:$(cat /etc/debian_chroot)]%{$reset_color%} "
|
||||
elif [[ -r /.dockerenv ]]; then
|
||||
# also prefix prompt inside a docker container
|
||||
ZSH_ESSEMBEH_PREFIX="%{$fg[yellow]%}[docker]%{$reset_color%} "
|
||||
fi
|
||||
if [[ $UID = 0 ]]; then
|
||||
# always use magenta for root sessions, even in ssh
|
||||
ZSH_ESSEMBEH_COLOR="magenta"
|
||||
fi
|
||||
PROMPT='${ZSH_ESSEMBEH_PREFIX}%{$fg[$ZSH_ESSEMBEH_COLOR]%}%n@%M%{$reset_color%}:%{%B$fg[yellow]%}%~%{$reset_color%b%} $(git_prompt_info)%(!.#.$) '
|
||||
RPROMPT="%(?..%{$fg[red]%}%?%{$reset_color%})"
|
2
dot_oh-my-zsh/themes/evan.zsh-theme
Normal file
2
dot_oh-my-zsh/themes/evan.zsh-theme
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Evan's minimal prompt
|
||||
PROMPT='%m :: %2~ %B»%b '
|
38
dot_oh-my-zsh/themes/fino-time.zsh-theme
Normal file
38
dot_oh-my-zsh/themes/fino-time.zsh-theme
Normal file
|
@ -0,0 +1,38 @@
|
|||
# fino-time.zsh-theme
|
||||
|
||||
# Use with a dark background and 256-color terminal!
|
||||
# Meant for people with RVM and git. Tested only on OS X 10.7.
|
||||
|
||||
# You can set your computer name in the ~/.box-name file if you want.
|
||||
|
||||
# Borrowing shamelessly from these oh-my-zsh themes:
|
||||
# bira
|
||||
# robbyrussell
|
||||
#
|
||||
# Also borrowing from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
|
||||
|
||||
function virtualenv_info {
|
||||
[ $CONDA_DEFAULT_ENV ] && echo "($CONDA_DEFAULT_ENV) "
|
||||
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
|
||||
}
|
||||
|
||||
function prompt_char {
|
||||
git branch >/dev/null 2>/dev/null && echo '⠠⠵' && return
|
||||
echo '○'
|
||||
}
|
||||
|
||||
function box_name {
|
||||
local box="${SHORT_HOST:-$HOST}"
|
||||
[[ -f ~/.box-name ]] && box="$(< ~/.box-name)"
|
||||
echo "${box:gs/%/%%}"
|
||||
}
|
||||
|
||||
PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}%~%{$reset_color%}\$(git_prompt_info)\$(ruby_prompt_info) %D - %*
|
||||
╰─\$(virtualenv_info)\$(prompt_char) "
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$FG[202]%}✘✘✘"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$FG[040]%}✔"
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX=" %{$FG[239]%}using%{$FG[243]%} ‹"
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
|
47
dot_oh-my-zsh/themes/fino.zsh-theme
Normal file
47
dot_oh-my-zsh/themes/fino.zsh-theme
Normal file
|
@ -0,0 +1,47 @@
|
|||
# fino.zsh-theme
|
||||
|
||||
# Use with a dark background and 256-color terminal!
|
||||
# Meant for people with rbenv and git. Tested only on OS X 10.7.
|
||||
|
||||
# You can set your computer name in the ~/.box-name file if you want.
|
||||
|
||||
# Borrowing shamelessly from these oh-my-zsh themes:
|
||||
# bira
|
||||
# robbyrussell
|
||||
#
|
||||
# Also borrowing from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
|
||||
|
||||
function virtualenv_prompt_info {
|
||||
[[ -n ${VIRTUAL_ENV} ]] || return
|
||||
echo "${ZSH_THEME_VIRTUALENV_PREFIX:=[}${VIRTUAL_ENV:t}${ZSH_THEME_VIRTUALENV_SUFFIX:=]}"
|
||||
}
|
||||
|
||||
function prompt_char {
|
||||
command git branch &>/dev/null && echo "±" || echo '○'
|
||||
}
|
||||
|
||||
function box_name {
|
||||
local box="${SHORT_HOST:-$HOST}"
|
||||
[[ -f ~/.box-name ]] && box="$(< ~/.box-name)"
|
||||
echo "${box:gs/%/%%}"
|
||||
}
|
||||
|
||||
local ruby_env='$(ruby_prompt_info)'
|
||||
local git_info='$(git_prompt_info)'
|
||||
local virtualenv_info='$(virtualenv_prompt_info)'
|
||||
local prompt_char='$(prompt_char)'
|
||||
|
||||
PROMPT="╭─${FG[040]}%n ${FG[239]}at ${FG[033]}$(box_name) ${FG[239]}in %B${FG[226]}%~%b${git_info}${ruby_env}${virtualenv_info}
|
||||
╰─${prompt_char}%{$reset_color%} "
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" ${FG[239]}on%{$reset_color%} ${FG[255]}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="${FG[202]}✘✘✘"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="${FG[040]}✔"
|
||||
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX=" ${FG[239]}using${FG[243]} ‹"
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
|
||||
|
||||
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||
ZSH_THEME_VIRTUALENV_PREFIX=" ${FG[239]}using${FG[243]} «"
|
||||
ZSH_THEME_VIRTUALENV_SUFFIX="»%{$reset_color%}"
|
36
dot_oh-my-zsh/themes/fishy.zsh-theme
Normal file
36
dot_oh-my-zsh/themes/fishy.zsh-theme
Normal file
|
@ -0,0 +1,36 @@
|
|||
# ZSH Theme emulating the Fish shell's default prompt.
|
||||
|
||||
_fishy_collapsed_wd() {
|
||||
local i pwd
|
||||
pwd=("${(s:/:)PWD/#$HOME/~}")
|
||||
if (( $#pwd > 1 )); then
|
||||
for i in {1..$(($#pwd-1))}; do
|
||||
if [[ "$pwd[$i]" = .* ]]; then
|
||||
pwd[$i]="${${pwd[$i]}[1,2]}"
|
||||
else
|
||||
pwd[$i]="${${pwd[$i]}[1]}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
echo "${(j:/:)pwd}"
|
||||
}
|
||||
|
||||
local user_color='green'; [ $UID -eq 0 ] && user_color='red'
|
||||
local host_color='white'; [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] && host_color='yellow'
|
||||
PROMPT='%{$fg[$user_color]%}%n%{$reset_color%}@%{$fg[$host_color]%}%m %{$fg[$user_color]%}$(_fishy_collapsed_wd)%{$reset_color%}%(!.#.>) '
|
||||
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
||||
|
||||
local return_status="%{$fg_bold[red]%}%(?..%?)%{$reset_color%}"
|
||||
RPROMPT="${RPROMPT}"'${return_status}$(git_prompt_info)$(git_prompt_status)%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" "
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg_bold[green]%}+"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg_bold[blue]%}!"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg_bold[red]%}-"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg_bold[magenta]%}>"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[yellow]%}#"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[cyan]%}?"
|
19
dot_oh-my-zsh/themes/flazz.zsh-theme
Normal file
19
dot_oh-my-zsh/themes/flazz.zsh-theme
Normal file
|
@ -0,0 +1,19 @@
|
|||
if [ "$USERNAME" = "root" ]
|
||||
then CARETCOLOR="red"
|
||||
else CARETCOLOR="blue"
|
||||
fi
|
||||
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
PROMPT='%m%{${fg_bold[magenta]}%} :: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}%#%{${reset_color}%} '
|
||||
|
||||
RPS1='$(vi_mode_prompt_info) ${return_code}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}‹"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
|
||||
|
||||
MODE_INDICATOR="%{$fg_bold[magenta]%}<%{$reset_color%}%{$fg[magenta]%}<<%{$reset_color%}"
|
||||
|
||||
# TODO use 265 colors
|
||||
#MODE_INDICATOR="$FX[bold]$FG[020]<$FX[no_bold]%{$fg[blue]%}<<%{$reset_color%}"
|
||||
# TODO use two lines if git
|
12
dot_oh-my-zsh/themes/fletcherm.zsh-theme
Normal file
12
dot_oh-my-zsh/themes/fletcherm.zsh-theme
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Copied from old version of tonotdo's theme. LSCOLORS modified.
|
||||
PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}•%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» '
|
||||
RPROMPT='[%*]'
|
||||
|
||||
# git theming
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}⚡%{$fg_bold[blue]%})"
|
||||
|
||||
export LSCOLORS="exfxcxdxbxegedabagacad"
|
||||
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
|
9
dot_oh-my-zsh/themes/fox.zsh-theme
Normal file
9
dot_oh-my-zsh/themes/fox.zsh-theme
Normal file
|
@ -0,0 +1,9 @@
|
|||
# fox.zsh-theme
|
||||
|
||||
PROMPT='%{$fg[cyan]%}┌[%{$fg_bold[white]%}%n%{$reset_color%}%{$fg[cyan]%}☮%{$fg_bold[white]%}%M%{$reset_color%}%{$fg[cyan]%}]%{$fg[white]%}-%{$fg[cyan]%}(%{$fg_bold[white]%}%~%{$reset_color%}%{$fg[cyan]%})$(git_prompt_info)
|
||||
└> % %{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="-[%{$reset_color%}%{$fg[white]%}git://%{$fg_bold[white]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}%{$fg[cyan]%}]-"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}"
|
12
dot_oh-my-zsh/themes/frisk.zsh-theme
Normal file
12
dot_oh-my-zsh/themes/frisk.zsh-theme
Normal file
|
@ -0,0 +1,12 @@
|
|||
PROMPT=$'
|
||||
%{$fg[blue]%}%/%{$reset_color%} $(git_prompt_info)$(bzr_prompt_info)%{$fg[white]%}[%n@%m]%{$reset_color%} %{$fg[white]%}[%T]%{$reset_color%}
|
||||
%{$fg_bold[black]%}>%{$reset_color%} '
|
||||
|
||||
PROMPT2="%{$fg_bold[black]%}%_> %{$reset_color%}"
|
||||
|
||||
GIT_CB="git::"
|
||||
ZSH_THEME_SCM_PROMPT_PREFIX="%{$fg[green]%}["
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=$ZSH_THEME_SCM_PROMPT_PREFIX$GIT_CB
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
13
dot_oh-my-zsh/themes/frontcube.zsh-theme
Normal file
13
dot_oh-my-zsh/themes/frontcube.zsh-theme
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
PROMPT='
|
||||
%{$fg_bold[gray]%}%~%{$fg_bold[blue]%}%{$fg_bold[blue]%} % %{$reset_color%}
|
||||
%{$fg[green]%}➞ %{$reset_color%}'
|
||||
|
||||
RPROMPT='$(git_prompt_info) $(ruby_prompt_info)'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}[git:"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}] %{$fg[red]%}✖ %{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}] %{$fg[green]%}✔%{$reset_color%}"
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[green]%}["
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="]%{$reset_color%}"
|
14
dot_oh-my-zsh/themes/funky.zsh-theme
Normal file
14
dot_oh-my-zsh/themes/funky.zsh-theme
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Taken from Tassilo's Blog
|
||||
# https://tsdh.wordpress.com/2007/12/06/my-funky-zsh-prompt/
|
||||
|
||||
local blue_op="%{$fg[blue]%}[%{$reset_color%}"
|
||||
local blue_cp="%{$fg[blue]%}]%{$reset_color%}"
|
||||
local path_p="${blue_op}%~${blue_cp}"
|
||||
local user_host="${blue_op}%n@%m${blue_cp}"
|
||||
local ret_status="${blue_op}%?${blue_cp}"
|
||||
local hist_no="${blue_op}%h${blue_cp}"
|
||||
local smiley="%(?,%{$fg[green]%}:%)%{$reset_color%},%{$fg[red]%}:(%{$reset_color%})"
|
||||
PROMPT="╭─${path_p}─${user_host}─${ret_status}─${hist_no}
|
||||
╰─${blue_op}${smiley}${blue_cp} %# "
|
||||
local cur_cmd="${blue_op}%_${blue_cp}"
|
||||
PROMPT2="${cur_cmd}> "
|
6
dot_oh-my-zsh/themes/fwalch.zsh-theme
Normal file
6
dot_oh-my-zsh/themes/fwalch.zsh-theme
Normal file
|
@ -0,0 +1,6 @@
|
|||
PROMPT='%{$fg_bold[green]%} %{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
11
dot_oh-my-zsh/themes/gallifrey.zsh-theme
Normal file
11
dot_oh-my-zsh/themes/gallifrey.zsh-theme
Normal file
|
@ -0,0 +1,11 @@
|
|||
# ZSH Theme - Preview: https://github.com/ohmyzsh/ohmyzsh/wiki/Themes#gallifrey
|
||||
return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
host_color="%(!.%{$fg[red]%}.%{$fg[green]%})"
|
||||
|
||||
PROMPT="${host_color}%m%{$reset_color%} %2~ \$(git_prompt_info)%{$reset_color%}%B»%b "
|
||||
RPS1="${return_code}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
|
||||
|
||||
unset return_code host_color
|
140
dot_oh-my-zsh/themes/gallois.zsh-theme
Normal file
140
dot_oh-my-zsh/themes/gallois.zsh-theme
Normal file
|
@ -0,0 +1,140 @@
|
|||
# Depends on the git plugin for work_in_progress()
|
||||
(( $+functions[work_in_progress] )) || work_in_progress() {}
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[cyan]%}[%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[cyan]%}]"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# Customized git status, oh-my-zsh currently does not allow render dirty status before branch
|
||||
git_custom_status() {
|
||||
local branch=$(git_current_branch)
|
||||
[[ -n "$branch" ]] || return 0
|
||||
print "%{${fg_bold[yellow]}%}$(work_in_progress)%{$reset_color%}\
|
||||
${ZSH_THEME_GIT_PROMPT_PREFIX}$(parse_git_dirty)${branch}\
|
||||
${ZSH_THEME_GIT_PROMPT_SUFFIX}"
|
||||
}
|
||||
autoload -U colors && colors
|
||||
|
||||
#export VCS_PROMPT=hg_prompt_info
|
||||
export VCS_PROMPT=git_custom_status
|
||||
|
||||
base_prompt="%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b "
|
||||
custom_prompt=""
|
||||
last_run_time=""
|
||||
last_vcs_info=""
|
||||
|
||||
|
||||
function pipestatus_parse {
|
||||
PIPESTATUS="$pipestatus"
|
||||
ERROR=0
|
||||
for i in "${(z)PIPESTATUS}"; do
|
||||
if [[ "$i" -ne 0 ]]; then
|
||||
ERROR=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "$ERROR" -ne 0 ]]; then
|
||||
print "[%{$fg[red]%}$PIPESTATUS%{$fg[cyan]%}]"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Combine it all into a final right-side prompt
|
||||
PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b '
|
||||
function preexec() {
|
||||
last_run_time=$(perl -MTime::HiRes=time -e 'printf "%.9f\n", time')
|
||||
}
|
||||
|
||||
function duration() {
|
||||
local duration
|
||||
local now=$(perl -MTime::HiRes=time -e 'printf "%.9f\n", time')
|
||||
local last=$1
|
||||
local last_split=("${(@s/./)last}")
|
||||
local now_split=("${(@s/./)now}")
|
||||
local T=$((now_split[1] - last_split[1]))
|
||||
local D=$((T/60/60/24))
|
||||
local H=$((T/60/60%24))
|
||||
local M=$((T/60%60))
|
||||
local S=$((T%60))
|
||||
local s=$(((now_split[2] - last_split[2]) / 1000000000.))
|
||||
local m=$(((now_split[2] - last_split[2]) / 1000000.))
|
||||
|
||||
(( $D > 0 )) && duration+="${D}d"
|
||||
(( $H > 0 )) && duration+="${H}h"
|
||||
(( $M > 0 )) && duration+="${M}m"
|
||||
|
||||
if [[ $S -le 0 ]]; then
|
||||
printf "%ims" "$m"
|
||||
else
|
||||
if ! [[ -z $duration ]] && printf "%s" "$duration"
|
||||
local sec_milli=$((S + s))
|
||||
printf "%.3fs" "$sec_milli"
|
||||
fi
|
||||
}
|
||||
|
||||
function precmd() {
|
||||
RETVAL=$(pipestatus_parse)
|
||||
local info=""
|
||||
|
||||
if [ ! -z "$last_run_time" ]; then
|
||||
local elapsed=$(duration $last_run_time)
|
||||
last_run_time=$(print $last_run_time | tr -d ".")
|
||||
if [ $(( $(perl -MTime::HiRes=time -e 'printf "%.9f\n", time' | tr -d ".") - $last_run_time )) -gt $(( 120 * 1000 * 1000 * 1000 )) ]; then
|
||||
local elapsed_color="%{$fg[magenta]%}"
|
||||
elif [ $(( $(perl -MTime::HiRes=time -e 'printf "%.9f\n", time' | tr -d ".") - $last_run_time )) -gt $(( 60 * 1000 * 1000 * 1000 )) ]; then
|
||||
local elapsed_color="%{$fg[red]%}"
|
||||
elif [ $(( $(perl -MTime::HiRes=time -e 'printf "%.9f\n", time' | tr -d ".") - $last_run_time )) -gt $(( 10 * 1000 * 1000 * 1000 )) ]; then
|
||||
local elapsed_color="%{$fg[yellow]%}"
|
||||
else
|
||||
local elapsed_color="%{$fg[green]%}"
|
||||
fi
|
||||
info=$(printf "%s%s%s%s%s" "%{$fg[cyan]%}[" "$elapsed_color" "$elapsed" "%{$fg[cyan]%}]" "$RETVAL")
|
||||
unset last_run_time
|
||||
fi
|
||||
|
||||
if [ -z "$info" -a ! -z "$last_vcs_info" ]; then
|
||||
custom_prompt="$last_vcs_info$base_prompt"
|
||||
return;
|
||||
fi
|
||||
|
||||
if (( ${+VCS_PROMPT} )); then
|
||||
last_vcs_info=$($VCS_PROMPT)
|
||||
if [ ! -z "$last_vcs_info" ]; then
|
||||
[ -z "$info" ] && info=$last_vcs_info || info="$info$last_vcs_info"
|
||||
fi
|
||||
fi
|
||||
|
||||
[ -z "$info" ] && custom_prompt="$base_prompt" || custom_prompt="$info$base_prompt"
|
||||
}
|
||||
|
||||
function hg_prompt_info() {
|
||||
unset output info parts branch_parts branch
|
||||
|
||||
local output=""
|
||||
if ! output="$(hg status 2> /dev/null)"; then
|
||||
return
|
||||
fi
|
||||
|
||||
local info=$(hg log -l1 --template '{author}:{node|short}:{remotenames}:{phabdiff}')
|
||||
local parts=(${(@s/:/)info})
|
||||
local branch_parts=(${(@s,/,)parts[3]})
|
||||
local branch=${branch_parts[-1]}
|
||||
[ ! -z "${parts[3]}" ] && [[ "${parts[1]}" =~ "$USER@" ]] && branch=${parts[3]}
|
||||
[ -z "${parts[3]}" ] && branch=${parts[2]}
|
||||
|
||||
if [[ ! -z "$output" ]]; then
|
||||
local color="%{$fg[red]%}"
|
||||
elif [[ "${branch}" == "master" || "${branch}" == "warm" ]]; then
|
||||
local color="%{$fg[yellow]%}"
|
||||
else
|
||||
local color="%{$fg[green]%}"
|
||||
fi
|
||||
|
||||
print "%{$fg[cyan]%}[${color}${branch}%{$fg[cyan]%}]"
|
||||
}
|
||||
|
||||
setopt PROMPT_SUBST
|
||||
PROMPT='$custom_prompt'
|
||||
|
||||
|
6
dot_oh-my-zsh/themes/garyblessington.zsh-theme
Normal file
6
dot_oh-my-zsh/themes/garyblessington.zsh-theme
Normal file
|
@ -0,0 +1,6 @@
|
|||
PROMPT='%{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}% %{$reset_color%}: '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg[blue]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[red]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
30
dot_oh-my-zsh/themes/gentoo.zsh-theme
Normal file
30
dot_oh-my-zsh/themes/gentoo.zsh-theme
Normal file
|
@ -0,0 +1,30 @@
|
|||
autoload -Uz colors && colors
|
||||
|
||||
autoload -Uz vcs_info
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes
|
||||
zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes
|
||||
zstyle ':vcs_info:*' actionformats '%F{5}(%F{2}%b%F{3}|%F{1}%a%c%u%m%F{5})%f '
|
||||
zstyle ':vcs_info:*' formats '%F{5}(%F{2}%b%c%u%m%F{5})%f '
|
||||
zstyle ':vcs_info:svn:*' branchformat '%b'
|
||||
zstyle ':vcs_info:svn:*' actionformats '%F{5}(%F{2}%b%F{1}:%{3}%i%F{3}|%F{1}%a%c%u%m%F{5})%f '
|
||||
zstyle ':vcs_info:svn:*' formats '%F{5}(%F{2}%b%F{1}:%F{3}%i%c%u%m%F{5})%f '
|
||||
zstyle ':vcs_info:*' enable git cvs svn
|
||||
zstyle ':vcs_info:git*+set-message:*' hooks untracked-git
|
||||
|
||||
+vi-untracked-git() {
|
||||
if command git status --porcelain 2>/dev/null | command grep -q '??'; then
|
||||
hook_com[misc]='%F{red}?'
|
||||
else
|
||||
hook_com[misc]=''
|
||||
fi
|
||||
}
|
||||
|
||||
gentoo_precmd() {
|
||||
vcs_info
|
||||
}
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook precmd gentoo_precmd
|
||||
|
||||
PROMPT='%(!.%B%F{red}.%B%F{green}%n@)%m %F{blue}%(!.%1~.%~) ${vcs_info_msg_0_}%F{blue}%(!.#.$)%k%b%f '
|
5
dot_oh-my-zsh/themes/geoffgarside.zsh-theme
Normal file
5
dot_oh-my-zsh/themes/geoffgarside.zsh-theme
Normal file
|
@ -0,0 +1,5 @@
|
|||
# PROMPT="[%*] %n:%c $(git_prompt_info)%(!.#.$) "
|
||||
PROMPT='[%*] %{$fg[cyan]%}%n%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(git_prompt_info) %(!.#.$) '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}git:("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
|
6
dot_oh-my-zsh/themes/gianu.zsh-theme
Normal file
6
dot_oh-my-zsh/themes/gianu.zsh-theme
Normal file
|
@ -0,0 +1,6 @@
|
|||
PROMPT='[%{$fg_bold[white]%}%n%{$reset_color%}@%{$fg_bold[red]%}%m%{$reset_color%} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)%{$reset_color%}]$ '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg_bold[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%} %{$fg[yellow]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$reset_color%}"
|
46
dot_oh-my-zsh/themes/gnzh.zsh-theme
Normal file
46
dot_oh-my-zsh/themes/gnzh.zsh-theme
Normal file
|
@ -0,0 +1,46 @@
|
|||
# Based on bira theme
|
||||
|
||||
setopt prompt_subst
|
||||
|
||||
() {
|
||||
|
||||
local PR_USER PR_USER_OP PR_PROMPT PR_HOST
|
||||
|
||||
# Check the UID
|
||||
if [[ $UID -ne 0 ]]; then # normal user
|
||||
PR_USER='%F{green}%n%f'
|
||||
PR_USER_OP='%F{green}%#%f'
|
||||
PR_PROMPT='%f➤ %f'
|
||||
else # root
|
||||
PR_USER='%F{red}%n%f'
|
||||
PR_USER_OP='%F{red}%#%f'
|
||||
PR_PROMPT='%F{red}➤ %f'
|
||||
fi
|
||||
|
||||
# Check if we are on SSH or not
|
||||
if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then
|
||||
PR_HOST='%F{red}%M%f' # SSH
|
||||
else
|
||||
PR_HOST='%F{green}%m%f' # no SSH
|
||||
fi
|
||||
|
||||
|
||||
local return_code="%(?..%F{red}%? ↵%f)"
|
||||
|
||||
local user_host="${PR_USER}%F{cyan}@${PR_HOST}"
|
||||
local current_dir="%B%F{blue}%~%f%b"
|
||||
local git_branch='$(git_prompt_info)'
|
||||
local venv_prompt='$(virtualenv_prompt_info)'
|
||||
|
||||
PROMPT="╭─${venv_prompt}${user_host} ${current_dir} \$(ruby_prompt_info) ${git_branch}
|
||||
╰─$PR_PROMPT "
|
||||
RPROMPT="${return_code}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}‹"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="› %f"
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX="%F{red}‹"
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="›%f"
|
||||
ZSH_THEME_VIRTUALENV_PREFIX="%F{red}("
|
||||
ZSH_THEME_VIRTUALENV_SUFFIX=")%f "
|
||||
|
||||
}
|
15
dot_oh-my-zsh/themes/gozilla.zsh-theme
Normal file
15
dot_oh-my-zsh/themes/gozilla.zsh-theme
Normal file
|
@ -0,0 +1,15 @@
|
|||
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%} %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
RPROMPT='$(git_prompt_status)%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ✂"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ✱"
|
97
dot_oh-my-zsh/themes/half-life.zsh-theme
Normal file
97
dot_oh-my-zsh/themes/half-life.zsh-theme
Normal file
|
@ -0,0 +1,97 @@
|
|||
# prompt style and colors based on Steve Losh's Prose theme:
|
||||
# https://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme
|
||||
#
|
||||
# vcs_info modifications from Bart Trojanowski's zsh prompt:
|
||||
# http://www.jukie.net/bart/blog/pimping-out-zsh-prompt
|
||||
#
|
||||
# git untracked files modification from Brian Carper:
|
||||
# https://briancarper.net/blog/570/git-info-in-your-zsh-prompt
|
||||
|
||||
#use extended color palette if available
|
||||
if [[ $TERM = (*256color|*rxvt*) ]]; then
|
||||
turquoise="%{${(%):-"%F{81}"}%}"
|
||||
orange="%{${(%):-"%F{166}"}%}"
|
||||
purple="%{${(%):-"%F{135}"}%}"
|
||||
hotpink="%{${(%):-"%F{161}"}%}"
|
||||
limegreen="%{${(%):-"%F{118}"}%}"
|
||||
else
|
||||
turquoise="%{${(%):-"%F{cyan}"}%}"
|
||||
orange="%{${(%):-"%F{yellow}"}%}"
|
||||
purple="%{${(%):-"%F{magenta}"}%}"
|
||||
hotpink="%{${(%):-"%F{red}"}%}"
|
||||
limegreen="%{${(%):-"%F{green}"}%}"
|
||||
fi
|
||||
|
||||
autoload -Uz vcs_info
|
||||
# enable VCS systems you use
|
||||
zstyle ':vcs_info:*' enable git svn
|
||||
|
||||
# check-for-changes can be really slow.
|
||||
# you should disable it, if you work with large repositories
|
||||
zstyle ':vcs_info:*:prompt:*' check-for-changes true
|
||||
|
||||
# set formats
|
||||
# %b - branchname
|
||||
# %u - unstagedstr (see below)
|
||||
# %c - stagedstr (see below)
|
||||
# %a - action (e.g. rebase-i)
|
||||
# %R - repository path
|
||||
# %S - path in the repository
|
||||
PR_RST="%{${reset_color}%}"
|
||||
FMT_BRANCH=" on ${turquoise}%b%u%c${PR_RST}"
|
||||
FMT_ACTION=" performing a ${limegreen}%a${PR_RST}"
|
||||
FMT_UNSTAGED="${orange} ●"
|
||||
FMT_STAGED="${limegreen} ●"
|
||||
|
||||
zstyle ':vcs_info:*:prompt:*' unstagedstr "${FMT_UNSTAGED}"
|
||||
zstyle ':vcs_info:*:prompt:*' stagedstr "${FMT_STAGED}"
|
||||
zstyle ':vcs_info:*:prompt:*' actionformats "${FMT_BRANCH}${FMT_ACTION}"
|
||||
zstyle ':vcs_info:*:prompt:*' formats "${FMT_BRANCH}"
|
||||
zstyle ':vcs_info:*:prompt:*' nvcsformats ""
|
||||
|
||||
|
||||
function steeef_chpwd {
|
||||
PR_GIT_UPDATE=1
|
||||
}
|
||||
|
||||
function steeef_preexec {
|
||||
case "$2" in
|
||||
*git*|*svn*) PR_GIT_UPDATE=1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
function steeef_precmd {
|
||||
(( PR_GIT_UPDATE )) || return
|
||||
|
||||
# check for untracked files or updated submodules, since vcs_info doesn't
|
||||
if [[ -n "$(git ls-files --other --exclude-standard 2>/dev/null)" ]]; then
|
||||
PR_GIT_UPDATE=1
|
||||
FMT_BRANCH="${PM_RST} on ${turquoise}%b%u%c${hotpink} ●${PR_RST}"
|
||||
else
|
||||
FMT_BRANCH="${PM_RST} on ${turquoise}%b%u%c${PR_RST}"
|
||||
fi
|
||||
zstyle ':vcs_info:*:prompt:*' formats "${FMT_BRANCH}"
|
||||
|
||||
vcs_info 'prompt'
|
||||
PR_GIT_UPDATE=
|
||||
}
|
||||
|
||||
# vcs_info running hooks
|
||||
PR_GIT_UPDATE=1
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook chpwd steeef_chpwd
|
||||
add-zsh-hook precmd steeef_precmd
|
||||
add-zsh-hook preexec steeef_preexec
|
||||
|
||||
# ruby prompt settings
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX="with%F{red} "
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_RVM_PROMPT_OPTIONS="v g"
|
||||
|
||||
# virtualenv prompt settings
|
||||
ZSH_THEME_VIRTUALENV_PREFIX=" with%F{red} "
|
||||
ZSH_THEME_VIRTUALENV_SUFFIX="%{$reset_color%}"
|
||||
|
||||
setopt prompt_subst
|
||||
PROMPT="${purple}%n%{$reset_color%} in ${limegreen}%~%{$reset_color%}\$(virtualenv_prompt_info)\$(ruby_prompt_info)\$vcs_info_msg_0_${orange} λ%{$reset_color%} "
|
26
dot_oh-my-zsh/themes/humza.zsh-theme
Normal file
26
dot_oh-my-zsh/themes/humza.zsh-theme
Normal file
|
@ -0,0 +1,26 @@
|
|||
# ZSH THEME Preview: https://skitch.com/huyy/rk979/humza.zshtheme
|
||||
|
||||
let TotalBytes=0
|
||||
for Bytes in $(ls -l | grep "^-" | awk '{ print $5 }')
|
||||
do
|
||||
let TotalBytes=$TotalBytes+$Bytes
|
||||
done
|
||||
# should it say b, kb, Mb, or Gb
|
||||
if [ $TotalBytes -lt 1024 ]; then
|
||||
TotalSize=$(echo -e "scale=3 \n$TotalBytes \nquit" | bc)
|
||||
suffix="b"
|
||||
elif [ $TotalBytes -lt 1048576 ]; then
|
||||
TotalSize=$(echo -e "scale=3 \n$TotalBytes/1024 \nquit" | bc)
|
||||
suffix="kb"
|
||||
elif [ $TotalBytes -lt 1073741824 ]; then
|
||||
TotalSize=$(echo -e "scale=3 \n$TotalBytes/1048576 \nquit" | bc)
|
||||
suffix="Mb"
|
||||
else
|
||||
TotalSize=$(echo -e "scale=3 \n$TotalBytes/1073741824 \nquit" | bc)
|
||||
suffix="Gb"
|
||||
fi
|
||||
|
||||
PROMPT='%{$reset_color%}%n %{$fg[green]%}{%{$reset_color%}%~%{$fg[green]%}}%{$reset_color%}$(git_prompt_info) greetings, earthling %{$fg[green]%}[%{$reset_color%}%{$TotalSize%}%{$suffix%}%{$fg[green]%}]%{$fg[red]%}$%{$reset_color%} ☞ '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}±("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=");%{$reset_color%}"
|
5
dot_oh-my-zsh/themes/imajes.zsh-theme
Normal file
5
dot_oh-my-zsh/themes/imajes.zsh-theme
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Found on the ZshWiki
|
||||
# http://zshwiki.org/home/config/prompt
|
||||
#
|
||||
|
||||
PROMPT="%{$fg[red]%}%%%{$reset_color%} "
|
23
dot_oh-my-zsh/themes/intheloop.zsh-theme
Normal file
23
dot_oh-my-zsh/themes/intheloop.zsh-theme
Normal file
|
@ -0,0 +1,23 @@
|
|||
# A multiline prompt with username, hostname, full path, return status, git branch, git dirty status, git remote status
|
||||
|
||||
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
|
||||
|
||||
local host_color="green"
|
||||
if [ -n "$SSH_CLIENT" ]; then
|
||||
local host_color="red"
|
||||
fi
|
||||
|
||||
PROMPT='
|
||||
%{$fg_bold[grey]%}[%{$reset_color%}%{$fg_bold[${host_color}]%}%n@%m%{$reset_color%}%{$fg_bold[grey]%}]%{$reset_color%} %{$fg_bold[blue]%}%10c%{$reset_color%} $(git_prompt_info) $(git_remote_status)
|
||||
%{$fg_bold[cyan]%}❯%{$reset_color%} '
|
||||
|
||||
|
||||
RPROMPT='${return_status}%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[grey]%}(%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[grey]%}) %{$fg[yellow]%}⚡%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[grey]%})"
|
||||
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="%{$fg_bold[magenta]%}↓%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE="%{$fg_bold[magenta]%}↑%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="%{$fg_bold[magenta]%}↕%{$reset_color%}"
|
18
dot_oh-my-zsh/themes/itchy.zsh-theme
Normal file
18
dot_oh-my-zsh/themes/itchy.zsh-theme
Normal file
|
@ -0,0 +1,18 @@
|
|||
local smiley="%(?,%{$fg[green]%}☺%{$reset_color%},%{$fg[red]%}☹%{$reset_color%})"
|
||||
|
||||
local user="%{$fg[cyan]%}%n%{$reset_color%}"
|
||||
local host="%{$fg[cyan]%}@%m%{$reset_color%}"
|
||||
local pwd="%{$fg[yellow]%}%~%{$reset_color%}"
|
||||
|
||||
PROMPT='${user}${host} ${pwd}
|
||||
${smiley} '
|
||||
|
||||
RPROMPT='$(ruby_prompt_info) %{$fg[white]%}$(git_prompt_info)%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ✔%{$reset_color%}"
|
||||
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX=""
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX=""
|
12
dot_oh-my-zsh/themes/jaischeema.zsh-theme
Normal file
12
dot_oh-my-zsh/themes/jaischeema.zsh-theme
Normal file
|
@ -0,0 +1,12 @@
|
|||
# jaischeema.zsh-theme
|
||||
|
||||
PROMPT='%{$fg_bold[magenta]%}%m%{$reset_color%} at %{$fg_bold[green]%}%~%{$reset_color%} %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}% %{$reset_color%}%{$fg[red]%}❯%{$reset_color%} '
|
||||
RPROMPT='$(ruby_prompt_info)'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="±(%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}) "
|
||||
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}"
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="%{$reset_color%}"
|
6
dot_oh-my-zsh/themes/jbergantine.zsh-theme
Normal file
6
dot_oh-my-zsh/themes/jbergantine.zsh-theme
Normal file
|
@ -0,0 +1,6 @@
|
|||
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%} %{$fg[cyan]%}%c %{$fg_bold[white]%}$(git_prompt_info)%{$fg_bold[white]%} % %{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[white]%}) %{$fg[yellow]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[white]%})"
|
10
dot_oh-my-zsh/themes/jispwoso.zsh-theme
Normal file
10
dot_oh-my-zsh/themes/jispwoso.zsh-theme
Normal file
|
@ -0,0 +1,10 @@
|
|||
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
|
||||
PROMPT=$'%{$fg[green]%}%n@%m: %{$reset_color%}%{$fg[blue]%}%/ %{$reset_color%}%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}
|
||||
${ret_status} %{$reset_color%} '
|
||||
|
||||
PROMPT2="%{$fg_blod[black]%}%_> %{$reset_color%}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
37
dot_oh-my-zsh/themes/jnrowe.zsh-theme
Normal file
37
dot_oh-my-zsh/themes/jnrowe.zsh-theme
Normal file
|
@ -0,0 +1,37 @@
|
|||
autoload -U add-zsh-hook
|
||||
autoload -Uz vcs_info
|
||||
|
||||
zstyle ':vcs_info:*' actionformats \
|
||||
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
|
||||
zstyle ':vcs_info:*' formats '%F{2}%s%F{7}:%F{2}(%F{1}%b%F{2})%f '
|
||||
zstyle ':vcs_info:*' enable git
|
||||
|
||||
add-zsh-hook precmd prompt_vcs
|
||||
|
||||
prompt_vcs () {
|
||||
vcs_info
|
||||
|
||||
if [ "${vcs_info_msg_0_}" = "" ]; then
|
||||
dir_status="%F{2}→%f"
|
||||
elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then
|
||||
dir_status="%F{1}▶%f"
|
||||
elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then
|
||||
dir_status="%F{3}▶%f"
|
||||
else
|
||||
dir_status="%F{2}▶%f"
|
||||
fi
|
||||
}
|
||||
|
||||
function {
|
||||
if [[ -n "$SSH_CLIENT" ]]; then
|
||||
PROMPT_HOST=" ($HOST)"
|
||||
else
|
||||
PROMPT_HOST=''
|
||||
fi
|
||||
}
|
||||
|
||||
local ret_status="%(?:%{$fg_bold[green]%}Ξ:%{$fg_bold[red]%}%S↑%s%?)"
|
||||
|
||||
PROMPT='${ret_status}%{$fg[blue]%}${PROMPT_HOST}%{$fg_bold[green]%} %{$fg_bold[yellow]%}%2~ ${vcs_info_msg_0_}${dir_status}%{$reset_color%} '
|
||||
|
||||
# vim: set ft=zsh ts=4 sw=4 et:
|
125
dot_oh-my-zsh/themes/jonathan.zsh-theme
Normal file
125
dot_oh-my-zsh/themes/jonathan.zsh-theme
Normal file
|
@ -0,0 +1,125 @@
|
|||
function theme_precmd {
|
||||
local TERMWIDTH=$(( COLUMNS - ${ZLE_RPROMPT_INDENT:-1} ))
|
||||
|
||||
PR_FILLBAR=""
|
||||
PR_PWDLEN=""
|
||||
|
||||
local promptsize=${#${(%):---(%n@%m:%l)---()--}}
|
||||
local rubypromptsize=${#${(%)$(ruby_prompt_info)}}
|
||||
local pwdsize=${#${(%):-%~}}
|
||||
local venvpromptsize=$((${#$(virtualenv_prompt_info)}))
|
||||
|
||||
# Truncate the path if it's too long.
|
||||
if (( promptsize + rubypromptsize + pwdsize + venvpromptsize > TERMWIDTH )); then
|
||||
(( PR_PWDLEN = TERMWIDTH - promptsize ))
|
||||
elif [[ "${langinfo[CODESET]}" = UTF-8 ]]; then
|
||||
PR_FILLBAR="\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize ) ))::${PR_HBAR}:)}"
|
||||
else
|
||||
PR_FILLBAR="${PR_SHIFT_IN}\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize ) ))::${altchar[q]:--}:)}${PR_SHIFT_OUT}"
|
||||
fi
|
||||
}
|
||||
|
||||
function theme_preexec {
|
||||
setopt local_options extended_glob
|
||||
if [[ "$TERM" = "screen" ]]; then
|
||||
local CMD=${1[(wr)^(*=*|sudo|-*)]}
|
||||
echo -n "\ek$CMD\e\\"
|
||||
fi
|
||||
}
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook precmd theme_precmd
|
||||
add-zsh-hook preexec theme_preexec
|
||||
|
||||
|
||||
# Set the prompt
|
||||
|
||||
# Need this so the prompt will work.
|
||||
setopt prompt_subst
|
||||
|
||||
# See if we can use colors.
|
||||
autoload zsh/terminfo
|
||||
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE GREY; do
|
||||
typeset -g PR_$color="%{$terminfo[bold]$fg[${(L)color}]%}"
|
||||
typeset -g PR_LIGHT_$color="%{$fg[${(L)color}]%}"
|
||||
done
|
||||
PR_NO_COLOUR="%{$terminfo[sgr0]%}"
|
||||
|
||||
# Modify Git prompt
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} %{%G✚%}"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} %{%G✹%}"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} %{%G✖%}"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} %{%G➜%}"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} %{%G═%}"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} %{%G✭%}"
|
||||
|
||||
# Use extended characters to look nicer if supported.
|
||||
if [[ "${langinfo[CODESET]}" = UTF-8 ]]; then
|
||||
PR_SET_CHARSET=""
|
||||
PR_HBAR="─"
|
||||
PR_ULCORNER="┌"
|
||||
PR_LLCORNER="└"
|
||||
PR_LRCORNER="┘"
|
||||
PR_URCORNER="┐"
|
||||
else
|
||||
typeset -g -A altchar
|
||||
set -A altchar ${(s..)terminfo[acsc]}
|
||||
# Some stuff to help us draw nice lines
|
||||
PR_SET_CHARSET="%{$terminfo[enacs]%}"
|
||||
PR_SHIFT_IN="%{$terminfo[smacs]%}"
|
||||
PR_SHIFT_OUT="%{$terminfo[rmacs]%}"
|
||||
PR_HBAR="${PR_SHIFT_IN}${altchar[q]:--}${PR_SHIFT_OUT}"
|
||||
PR_ULCORNER="${PR_SHIFT_IN}${altchar[l]:--}${PR_SHIFT_OUT}"
|
||||
PR_LLCORNER="${PR_SHIFT_IN}${altchar[m]:--}${PR_SHIFT_OUT}"
|
||||
PR_LRCORNER="${PR_SHIFT_IN}${altchar[j]:--}${PR_SHIFT_OUT}"
|
||||
PR_URCORNER="${PR_SHIFT_IN}${altchar[k]:--}${PR_SHIFT_OUT}"
|
||||
fi
|
||||
|
||||
# Decide if we need to set titlebar text.
|
||||
case $TERM in
|
||||
xterm*)
|
||||
PR_TITLEBAR=$'%{\e]0;%(!.-=*[ROOT]*=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\a%}'
|
||||
;;
|
||||
screen)
|
||||
PR_TITLEBAR=$'%{\e_screen \005 (\005t) | %(!.-=[ROOT]=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\e\\%}'
|
||||
;;
|
||||
*)
|
||||
PR_TITLEBAR=""
|
||||
;;
|
||||
esac
|
||||
|
||||
# Decide whether to set a screen title
|
||||
if [[ "$TERM" = "screen" ]]; then
|
||||
PR_STITLE=$'%{\ekzsh\e\\%}'
|
||||
else
|
||||
PR_STITLE=""
|
||||
fi
|
||||
|
||||
# Finally, the prompt.
|
||||
PROMPT='${PR_SET_CHARSET}${PR_STITLE}${(e)PR_TITLEBAR}\
|
||||
${PR_CYAN}${PR_ULCORNER}${PR_HBAR}${PR_GREY}(\
|
||||
${PR_GREEN}%${PR_PWDLEN}<...<%~%<<\
|
||||
${PR_GREY})$(virtualenv_prompt_info)$(ruby_prompt_info)${PR_CYAN}${PR_HBAR}${PR_HBAR}${(e)PR_FILLBAR}${PR_HBAR}${PR_GREY}(\
|
||||
${PR_CYAN}%(!.%SROOT%s.%n)${PR_GREY}@${PR_GREEN}%m:%l\
|
||||
${PR_GREY})${PR_CYAN}${PR_HBAR}${PR_URCORNER}\
|
||||
|
||||
${PR_CYAN}${PR_LLCORNER}${PR_BLUE}${PR_HBAR}(\
|
||||
${PR_YELLOW}%D{%H:%M:%S}\
|
||||
${PR_LIGHT_BLUE}%{$reset_color%}$(git_prompt_info)$(git_prompt_status)${PR_BLUE})${PR_CYAN}${PR_HBAR}\
|
||||
${PR_HBAR}\
|
||||
>${PR_NO_COLOUR} '
|
||||
|
||||
# display exitcode on the right when > 0
|
||||
return_code="%(?..%{$fg[red]%}%? ↵ %{$reset_color%})"
|
||||
RPROMPT=' $return_code${PR_CYAN}${PR_HBAR}${PR_BLUE}${PR_HBAR}\
|
||||
(${PR_YELLOW}%D{%a,%b%d}${PR_BLUE})${PR_HBAR}${PR_CYAN}${PR_LRCORNER}${PR_NO_COLOUR}'
|
||||
|
||||
PS2='${PR_CYAN}${PR_HBAR}\
|
||||
${PR_BLUE}${PR_HBAR}(\
|
||||
${PR_LIGHT_GREEN}%_${PR_BLUE})${PR_HBAR}\
|
||||
${PR_CYAN}${PR_HBAR}${PR_NO_COLOUR} '
|
43
dot_oh-my-zsh/themes/josh.zsh-theme
Normal file
43
dot_oh-my-zsh/themes/josh.zsh-theme
Normal file
|
@ -0,0 +1,43 @@
|
|||
grey='\e[0;90m'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$grey%}("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$grey%}) %{$fg[yellow]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$grey%})"
|
||||
|
||||
function josh_prompt {
|
||||
(( spare_width = ${COLUMNS} ))
|
||||
prompt=" "
|
||||
|
||||
branch=$(git_current_branch)
|
||||
ruby_version=$(ruby_prompt_info)
|
||||
path_size=${#PWD}
|
||||
branch_size=${#branch}
|
||||
ruby_size=${#ruby_version}
|
||||
user_machine_size=${#${(%):-%n@%m-}}
|
||||
|
||||
if [[ ${#branch} -eq 0 ]]
|
||||
then (( ruby_size = ruby_size + 1 ))
|
||||
else
|
||||
(( branch_size = branch_size + 4 ))
|
||||
if [[ -n $(git status -s 2> /dev/null) ]]; then
|
||||
(( branch_size = branch_size + 2 ))
|
||||
fi
|
||||
fi
|
||||
|
||||
(( spare_width = ${spare_width} - (${user_machine_size} + ${path_size} + ${branch_size} + ${ruby_size}) ))
|
||||
|
||||
while [ ${#prompt} -lt $spare_width ]; do
|
||||
prompt=" $prompt"
|
||||
done
|
||||
|
||||
prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(ruby_prompt_info)%{$reset_color%} $(git_current_branch)"
|
||||
|
||||
echo $prompt
|
||||
}
|
||||
|
||||
setopt prompt_subst
|
||||
|
||||
PROMPT='
|
||||
%n@%m $(josh_prompt)
|
||||
%(?,%{%F{green}%},%{%F{red}%})⚡%{$reset_color%} '
|
14
dot_oh-my-zsh/themes/jreese.zsh-theme
Normal file
14
dot_oh-my-zsh/themes/jreese.zsh-theme
Normal file
|
@ -0,0 +1,14 @@
|
|||
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %~ \
|
||||
$(git_prompt_info)\
|
||||
%{$fg[red]%}%(!.#.»)%{$reset_color%} '
|
||||
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
||||
RPS1='${return_code}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}±%{$fg[yellow]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="⚡"
|
||||
|
2
dot_oh-my-zsh/themes/jtriley.zsh-theme
Normal file
2
dot_oh-my-zsh/themes/jtriley.zsh-theme
Normal file
|
@ -0,0 +1,2 @@
|
|||
PROMPT="%{$fg_bold[cyan]%}%T%{$fg_bold[green]%} %{$fg_bold[white]%}%n%{$fg[magenta]%}@%{$fg_bold[white]%}%m %{$fg_bold[green]%}%d
|
||||
%{$fg_bold[yellow]%}%% %{$reset_color%}"
|
41
dot_oh-my-zsh/themes/juanghurtado.zsh-theme
Normal file
41
dot_oh-my-zsh/themes/juanghurtado.zsh-theme
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Color shortcuts
|
||||
RED=$fg[red]
|
||||
YELLOW=$fg[yellow]
|
||||
GREEN=$fg[green]
|
||||
WHITE=$fg[white]
|
||||
BLUE=$fg[blue]
|
||||
RED_BOLD=$fg_bold[red]
|
||||
YELLOW_BOLD=$fg_bold[yellow]
|
||||
GREEN_BOLD=$fg_bold[green]
|
||||
WHITE_BOLD=$fg_bold[white]
|
||||
BLUE_BOLD=$fg_bold[blue]
|
||||
RESET_COLOR=$reset_color
|
||||
|
||||
# Format for git_prompt_info()
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
|
||||
# Format for parse_git_dirty()
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RED%}(*)"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# Format for git_prompt_status()
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED=" %{$RED%}unmerged"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED=" %{$RED%}deleted"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED=" %{$YELLOW%}renamed"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED=" %{$YELLOW%}modified"
|
||||
ZSH_THEME_GIT_PROMPT_ADDED=" %{$GREEN%}added"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED=" %{$WHITE%}untracked"
|
||||
|
||||
# Format for git_prompt_ahead()
|
||||
ZSH_THEME_GIT_PROMPT_AHEAD=" %{$RED%}(!)"
|
||||
|
||||
# Format for git_prompt_long_sha() and git_prompt_short_sha()
|
||||
ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$WHITE%}[%{$YELLOW%}"
|
||||
ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$WHITE%}]"
|
||||
|
||||
# Prompt format
|
||||
PROMPT='
|
||||
%{$GREEN_BOLD%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%}
|
||||
%{$BLUE%}>%{$RESET_COLOR%} '
|
||||
RPROMPT='%{$GREEN_BOLD%}$(git_current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}'
|
30
dot_oh-my-zsh/themes/junkfood.zsh-theme
Normal file
30
dot_oh-my-zsh/themes/junkfood.zsh-theme
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Totally ripped off Dallas theme
|
||||
|
||||
# Grab the current date (%W) and time (%t):
|
||||
JUNKFOOD_TIME_="%{$fg_bold[red]%}#%{$fg_bold[white]%}( %{$fg_bold[yellow]%}%W%{$reset_color%}@%{$fg_bold[white]%}%t )( %{$reset_color%}"
|
||||
|
||||
# Grab the current machine name
|
||||
JUNKFOOD_MACHINE_="%{$fg_bold[blue]%}%m%{$fg[white]%} ):%{$reset_color%}"
|
||||
|
||||
# Grab the current username
|
||||
JUNKFOOD_CURRENT_USER_="%{$fg_bold[green]%}%n%{$reset_color%}"
|
||||
|
||||
# Grab the current filepath, use shortcuts: ~/Desktop
|
||||
# Append the current git branch, if in a git repository: ~aw@master
|
||||
JUNKFOOD_LOCA_="%{$fg[cyan]%}%~\$(git_prompt_info)%{$reset_color%}"
|
||||
|
||||
# For the git prompt, use a white @ and blue text for the branch name
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}@%{$fg_bold[white]%}"
|
||||
|
||||
# Close it all off by resetting the color and styles.
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
|
||||
# Do nothing if the branch is clean (no changes).
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}✔"
|
||||
|
||||
# Add 3 cyan ✗s if this branch is diiirrrty! Dirty branch!
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✗✗✗"
|
||||
|
||||
# Put it all together!
|
||||
PROMPT="$JUNKFOOD_TIME_$JUNKFOOD_CURRENT_USER_@$JUNKFOOD_MACHINE_$JUNKFOOD_LOCA_
|
||||
"
|
6
dot_oh-my-zsh/themes/kafeitu.zsh-theme
Normal file
6
dot_oh-my-zsh/themes/kafeitu.zsh-theme
Normal file
|
@ -0,0 +1,6 @@
|
|||
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%n%{$fg[cyan]%}@%{$fg_bold[green]%}%m %{$fg_bold[green]%} %{$fg[cyan]%}%~ %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
12
dot_oh-my-zsh/themes/kardan.zsh-theme
Normal file
12
dot_oh-my-zsh/themes/kardan.zsh-theme
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Simple theme based on my old zsh settings.
|
||||
|
||||
function get_host {
|
||||
echo '@'$HOST
|
||||
}
|
||||
|
||||
PROMPT='> '
|
||||
RPROMPT='%~$(git_prompt_info)$(get_host)'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
|
15
dot_oh-my-zsh/themes/kennethreitz.zsh-theme
Normal file
15
dot_oh-my-zsh/themes/kennethreitz.zsh-theme
Normal file
|
@ -0,0 +1,15 @@
|
|||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
PROMPT='$(virtualenv_prompt_info)%{[03m%}%{$fg[green]%}%c \
|
||||
$(git_prompt_info)\
|
||||
\
|
||||
%{$fg[red]%}%(!.#.»)%{$reset_color%} '
|
||||
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
||||
RPS1='%{$fg[blue]%}%~%{$reset_color%} ${return_code} '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[yellow]%}("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$fg[yellow]%}"
|
||||
ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX="%{$reset_color%}%{[03m%}%{$fg[blue]%}"
|
||||
ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX="!%{$reset_color%} "
|
10
dot_oh-my-zsh/themes/kiwi.zsh-theme
Normal file
10
dot_oh-my-zsh/themes/kiwi.zsh-theme
Normal file
|
@ -0,0 +1,10 @@
|
|||
(( $+functions[battery_pct_prompt] )) || function battery_pct_prompt { }
|
||||
|
||||
PROMPT='%{$fg_bold[green]%}┌[%{$fg_bold[cyan]%}kiwish-4.2%{$fg_bold[green]%}]-(%{$fg_bold[white]%}%2~%{$fg_bold[green]%})-$(git_prompt_info)$(svn_prompt_info)$(battery_pct_prompt)
|
||||
└> % %{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="[%{$reset_color%}%{$fg[white]%}git:%{$fg_bold[white]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg_bold[green]%}]-"
|
||||
|
||||
ZSH_THEME_SVN_PROMPT_PREFIX="[%{$reset_color%}%{$fg[white]%}svn:%{$fg_bold[white]%}/"
|
||||
ZSH_THEME_SVN_PROMPT_SUFFIX="%{$fg_bold[green]%}]-"
|
24
dot_oh-my-zsh/themes/kolo.zsh-theme
Normal file
24
dot_oh-my-zsh/themes/kolo.zsh-theme
Normal file
|
@ -0,0 +1,24 @@
|
|||
autoload -Uz vcs_info
|
||||
|
||||
zstyle ':vcs_info:*' stagedstr '%F{green}●'
|
||||
zstyle ':vcs_info:*' unstagedstr '%F{yellow}●'
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:svn:*' branchformat '%b'
|
||||
zstyle ':vcs_info:svn:*' formats ' [%b%F{1}:%F{11}%i%c%u%B%F{green}]'
|
||||
zstyle ':vcs_info:*' enable git svn
|
||||
|
||||
theme_precmd () {
|
||||
if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
|
||||
zstyle ':vcs_info:git:*' formats ' [%b%c%u%B%F{green}]'
|
||||
else
|
||||
zstyle ':vcs_info:git:*' formats ' [%b%c%u%B%F{red}●%F{green}]'
|
||||
fi
|
||||
|
||||
vcs_info
|
||||
}
|
||||
|
||||
setopt prompt_subst
|
||||
PROMPT='%B%F{magenta}%c%B%F{green}${vcs_info_msg_0_}%B%F{magenta} %{$reset_color%}%% '
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook precmd theme_precmd
|
43
dot_oh-my-zsh/themes/kphoen.zsh-theme
Normal file
43
dot_oh-my-zsh/themes/kphoen.zsh-theme
Normal file
|
@ -0,0 +1,43 @@
|
|||
# kphoen.zsh-theme
|
||||
|
||||
if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
|
||||
PROMPT='[%{$fg[red]%}%n%{$reset_color%}@%{$fg[magenta]%}%m%{$reset_color%}:%{$fg[blue]%}%~%{$reset_color%}$(git_prompt_info)]
|
||||
%# '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# display exitcode on the right when >0
|
||||
return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
RPROMPT='${return_code}$(git_prompt_status)%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
|
||||
else
|
||||
PROMPT='[%n@%m:%~$(git_prompt_info)]
|
||||
%# '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" on"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# display exitcode on the right when >0
|
||||
return_code="%(?..%? ↵)"
|
||||
|
||||
RPROMPT='${return_code}$(git_prompt_status)'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED=" ✚"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED=" ✹"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED=" ✖"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED=" ➜"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED=" ═"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED=" ✭"
|
||||
fi
|
4
dot_oh-my-zsh/themes/lambda.zsh-theme
Normal file
4
dot_oh-my-zsh/themes/lambda.zsh-theme
Normal file
|
@ -0,0 +1,4 @@
|
|||
PROMPT='λ %~/ $(git_prompt_info)%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
58
dot_oh-my-zsh/themes/linuxonly.zsh-theme
Normal file
58
dot_oh-my-zsh/themes/linuxonly.zsh-theme
Normal file
|
@ -0,0 +1,58 @@
|
|||
autoload -U add-zsh-hook
|
||||
autoload -Uz vcs_info
|
||||
|
||||
local c0=$(printf "\033[0m")
|
||||
local c1=$(printf "\033[38;5;215m")
|
||||
local c2=$(printf "\033[38;5;209m")
|
||||
local c3=$(printf "\033[38;5;203m")
|
||||
local c4=$(printf "\033[33;4m")
|
||||
local c5=$(printf "\033[38;5;137m")
|
||||
local c6=$(printf "\033[38;5;240m")
|
||||
local c7=$(printf "\033[38;5;149m")
|
||||
local c8=$(printf "\033[38;5;126m")
|
||||
local c9=$(printf "\033[38;5;162m")
|
||||
|
||||
if [ "$TERM" = "linux" ]; then
|
||||
c1=$(printf "\033[34;1m")
|
||||
c2=$(printf "\033[35m")
|
||||
c3=$(printf "\033[31m")
|
||||
c4=$(printf "\033[31;1m")
|
||||
c5=$(printf "\033[32m")
|
||||
c6=$(printf "\033[32;1m")
|
||||
c7=$(printf "\033[33m")
|
||||
c8=$(printf "\033[33;1m")
|
||||
c9=$(printf "\033[34m")
|
||||
fi
|
||||
|
||||
zstyle ':vcs_info:*' actionformats \
|
||||
'%{$c8%}(%f%s)%{$c7%}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
|
||||
zstyle ':vcs_info:*' formats \
|
||||
"%{$c8%}%s%{$c7%}:%{$c7%}(%{$c9%}%b%{$c7%})%f "
|
||||
zstyle ':vcs_info:*' enable git
|
||||
|
||||
add-zsh-hook precmd prompt_jnrowe_precmd
|
||||
|
||||
prompt_jnrowe_precmd () {
|
||||
vcs_info
|
||||
|
||||
if [ "${vcs_info_msg_0_}" = "" ]; then
|
||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||
PROMPT='${dir_status} ${ret_status}%{$reset_color%}
|
||||
> '
|
||||
elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then
|
||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||
PROMPT='${vcs_info_msg_0_}
|
||||
${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
|
||||
> '
|
||||
elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then
|
||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||
PROMPT='${vcs_info_msg_0_}
|
||||
${dir_status}%{$reset_color%}
|
||||
%{$c9%}·>%{$c0%} '
|
||||
else
|
||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||
PROMPT='${vcs_info_msg_0_}
|
||||
${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
|
||||
> '
|
||||
fi
|
||||
}
|
24
dot_oh-my-zsh/themes/lukerandall.zsh-theme
Normal file
24
dot_oh-my-zsh/themes/lukerandall.zsh-theme
Normal file
|
@ -0,0 +1,24 @@
|
|||
# ZSH Theme - Preview: https://cl.ly/f701d00760f8059e06dc
|
||||
# Thanks to gallifrey, upon whose theme this is based
|
||||
|
||||
local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
function my_git_prompt_info() {
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||
GIT_STATUS=$(git_prompt_status)
|
||||
[[ -n $GIT_STATUS ]] && GIT_STATUS=" $GIT_STATUS"
|
||||
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$GIT_STATUS$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
}
|
||||
|
||||
PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%2~%{$reset_color%} $(my_git_prompt_info)%{$reset_color%}%B»%b '
|
||||
RPS1="${return_code}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%%"
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="+"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="*"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="~"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="!"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="?"
|
||||
|
12
dot_oh-my-zsh/themes/macovsky.zsh-theme
Normal file
12
dot_oh-my-zsh/themes/macovsky.zsh-theme
Normal file
|
@ -0,0 +1,12 @@
|
|||
# ZSH Theme - Preview: https://i.gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
PROMPT='%{$fg[green]%}%~%{$reset_color%} $(ruby_prompt_info) $(git_prompt_info)%{$reset_color%}%B$%b '
|
||||
RPROMPT="${return_code}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
|
||||
|
||||
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}‹"
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="› %{$reset_color%}"
|
6
dot_oh-my-zsh/themes/maran.zsh-theme
Normal file
6
dot_oh-my-zsh/themes/maran.zsh-theme
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Theme with full path names and hostname
|
||||
# Handy if you work on different servers all the time;
|
||||
PROMPT='%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[yellow]%}%M:%{$fg[green]%}%/%{$reset_color%}$(git_prompt_info) %(!.#.$) '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}git:("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
|
6
dot_oh-my-zsh/themes/mgutz.zsh-theme
Normal file
6
dot_oh-my-zsh/themes/mgutz.zsh-theme
Normal file
|
@ -0,0 +1,6 @@
|
|||
PROMPT='%{$fg_bold[magenta]%}%1~$(git_prompt_info) %{$fg_bold[magenta]%}%# %{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}["
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="*]"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="]"
|
24
dot_oh-my-zsh/themes/mh.zsh-theme
Normal file
24
dot_oh-my-zsh/themes/mh.zsh-theme
Normal file
|
@ -0,0 +1,24 @@
|
|||
# mh theme
|
||||
# preview: https://cl.ly/1y2x0W0E3t2C0F29043z
|
||||
|
||||
# features:
|
||||
# path is autoshortened to ~30 characters
|
||||
# displays git status (if applicable in current folder)
|
||||
# turns username green if superuser, otherwise it is white
|
||||
|
||||
# if superuser make the username green
|
||||
if [ $UID -eq 0 ]; then NCOLOR="green"; else NCOLOR="white"; fi
|
||||
|
||||
# prompt
|
||||
PROMPT='[%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[red]%}%30<...<%~%<<%{$reset_color%}]%(!.#.$) '
|
||||
RPROMPT='$(git_prompt_info)'
|
||||
|
||||
# git theming
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[gray]%}(%{$fg_no_bold[yellow]%}%B"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[gray]%})%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✱"
|
||||
|
||||
# LS colors, made with https://geoff.greer.fm/lscolors/
|
||||
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
|
78
dot_oh-my-zsh/themes/michelebologna.zsh-theme
Normal file
78
dot_oh-my-zsh/themes/michelebologna.zsh-theme
Normal file
|
@ -0,0 +1,78 @@
|
|||
# Michele Bologna's theme
|
||||
# https://www.michelebologna.net
|
||||
#
|
||||
# This a theme for oh-my-zsh. Features a colored prompt with:
|
||||
# * username@host: [jobs] [git] workdir %
|
||||
# * hostname color is based on hostname characters. When using as root, the
|
||||
# prompt shows only the hostname in red color.
|
||||
# * [jobs], if applicable, counts the number of suspended jobs tty
|
||||
# * [git], if applicable, represents the status of your git repo (more on that
|
||||
# later)
|
||||
# * '%' prompt will be green if last command return value is 0, yellow otherwise.
|
||||
#
|
||||
# git prompt is inspired by official git contrib prompt:
|
||||
# https://github.com/git/git/tree/master/contrib/completion/git-prompt.sh
|
||||
# and it adds:
|
||||
# * the current branch
|
||||
# * '%' if there are untracked files
|
||||
# * '$' if there are stashed changes
|
||||
# * '*' if there are modified files
|
||||
# * '+' if there are added files
|
||||
# * '<' if local repo is behind remote repo
|
||||
# * '>' if local repo is ahead remote repo
|
||||
# * '=' if local repo is equal to remote repo (in sync)
|
||||
# * '<>' if local repo is diverged
|
||||
|
||||
local green="%{$fg_bold[green]%}"
|
||||
local red="%{$fg_bold[red]%}"
|
||||
local cyan="%{$fg_bold[cyan]%}"
|
||||
local yellow="%{$fg_bold[yellow]%}"
|
||||
local blue="%{$fg_bold[blue]%}"
|
||||
local magenta="%{$fg_bold[magenta]%}"
|
||||
local reset="%{$reset_color%}"
|
||||
|
||||
local -a color_array
|
||||
color_array=($green $red $cyan $yellow $blue $magenta)
|
||||
|
||||
local username_color=$blue
|
||||
local hostname_color=$color_array[$[((#HOST))%6+1]] # choose hostname color based on first character
|
||||
local current_dir_color=$blue
|
||||
|
||||
local username="%n"
|
||||
local hostname="%m"
|
||||
local current_dir="%~"
|
||||
|
||||
local username_output="%(!..${username_color}${username}${reset}@)"
|
||||
local hostname_output="${hostname_color}${hostname}${reset}"
|
||||
local current_dir_output="${current_dir_color}${current_dir}${reset}"
|
||||
local jobs_bg="${red}fg: %j$reset"
|
||||
local last_command_output="%(?.%(!.$red.$green).$yellow)"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="$blue%%"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="$red*"
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="$green+"
|
||||
ZSH_THEME_GIT_PROMPT_STASHED="$blue$"
|
||||
ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE="$green="
|
||||
ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=">"
|
||||
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="<"
|
||||
ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="$red<>"
|
||||
|
||||
function michelebologna_git_prompt {
|
||||
local out=$(git_prompt_info)$(git_prompt_status)$(git_remote_status)
|
||||
[[ -n $out ]] || return
|
||||
printf " %s(%s%s%s)%s" \
|
||||
"%{$fg_bold[blue]%}" \
|
||||
"%{$fg_bold[green]%}" \
|
||||
"$out" \
|
||||
"%{$fg_bold[blue]%}" \
|
||||
"%{$reset_color%}"
|
||||
}
|
||||
|
||||
PROMPT="$username_output$hostname_output:$current_dir_output%1(j. [$jobs_bg].)"
|
||||
PROMPT+='$(michelebologna_git_prompt)'
|
||||
PROMPT+=" $last_command_output%#$reset "
|
||||
RPROMPT=''
|
21
dot_oh-my-zsh/themes/mikeh.zsh-theme
Normal file
21
dot_oh-my-zsh/themes/mikeh.zsh-theme
Normal file
|
@ -0,0 +1,21 @@
|
|||
setopt prompt_subst
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
autoload -Uz vcs_info
|
||||
|
||||
# check-for-changes can be really slow.
|
||||
# you should disable it, if you work with large repositories
|
||||
zstyle ':vcs_info:*:prompt:*' check-for-changes true
|
||||
|
||||
add-zsh-hook precmd mikeh_precmd
|
||||
|
||||
mikeh_precmd() {
|
||||
vcs_info
|
||||
}
|
||||
|
||||
# user, host, full path, and time/date
|
||||
# on two lines for easier vgrepping
|
||||
# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
|
||||
PROMPT=$'%{\e[0;34m%}%B..[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
|
||||
%{\e[0;34m%}%B..%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <($vcs_info_msg_0_)>%{\e[0m%}%b '
|
||||
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
|
8
dot_oh-my-zsh/themes/miloshadzic.zsh-theme
Normal file
8
dot_oh-my-zsh/themes/miloshadzic.zsh-theme
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Yay! High voltage and arrows!
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}⚡%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
PROMPT='%{$fg[cyan]%}%1~%{$reset_color%}%{$fg[red]%}|%{$reset_color%}$(git_prompt_info)%{$fg[cyan]%}⇒%{$reset_color%} '
|
26
dot_oh-my-zsh/themes/minimal.zsh-theme
Normal file
26
dot_oh-my-zsh/themes/minimal.zsh-theme
Normal file
|
@ -0,0 +1,26 @@
|
|||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[white]%}["
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$fg[white]%}]%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="]%{$reset_color%} "
|
||||
|
||||
ZSH_THEME_SVN_PROMPT_PREFIX="$ZSH_THEME_GIT_PROMPT_PREFIX"
|
||||
ZSH_THEME_SVN_PROMPT_SUFFIX="$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
ZSH_THEME_SVN_PROMPT_DIRTY="$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||
ZSH_THEME_SVN_PROMPT_CLEAN="$ZSH_THEME_GIT_PROMPT_CLEAN"
|
||||
|
||||
ZSH_THEME_HG_PROMPT_PREFIX="$ZSH_THEME_GIT_PROMPT_PREFIX"
|
||||
ZSH_THEME_HG_PROMPT_SUFFIX="$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
ZSH_THEME_HG_PROMPT_DIRTY="$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||
ZSH_THEME_HG_PROMPT_CLEAN="$ZSH_THEME_GIT_PROMPT_CLEAN"
|
||||
|
||||
vcs_status() {
|
||||
if (( ${+functions[in_svn]} )) && in_svn; then
|
||||
svn_prompt_info
|
||||
elif (( ${+functions[in_hg]} )) && in_hg; then
|
||||
hg_prompt_info
|
||||
else
|
||||
git_prompt_info
|
||||
fi
|
||||
}
|
||||
|
||||
PROMPT='%2~ $(vcs_status)»%b '
|
23
dot_oh-my-zsh/themes/mira.zsh-theme
Normal file
23
dot_oh-my-zsh/themes/mira.zsh-theme
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Based on bira zsh theme with nvm, rvm and jenv support
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
|
||||
local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}'
|
||||
|
||||
local nvm_node='%{$fg[green]%}‹node-$(nvm_prompt_info)›%{$reset_color%}'
|
||||
|
||||
local jenv_java='%{$fg[blue]%}‹$(jenv_prompt_info)›%{$reset_color%}'
|
||||
|
||||
local git_branch='$(git_prompt_info)'
|
||||
|
||||
local rvm_ruby='$(ruby_prompt_info)'
|
||||
|
||||
PROMPT="╭─${user_host} ${current_dir} ${nvm_node} ${rvm_ruby} ${jenv_java} ${git_branch}
|
||||
╰─%B$%b "
|
||||
RPS1="${return_code}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
|
||||
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}‹"
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
|
105
dot_oh-my-zsh/themes/mlh.zsh-theme
Normal file
105
dot_oh-my-zsh/themes/mlh.zsh-theme
Normal file
|
@ -0,0 +1,105 @@
|
|||
# The Official Theme of Major League Hacking
|
||||
|
||||
## ## ## ## ##
|
||||
### ### ## ## ##
|
||||
#### #### ## ## ##
|
||||
## ### ## ## #########
|
||||
## ## ## ## ##
|
||||
## ## ## ## ##
|
||||
## ## ######## ## ##
|
||||
|
||||
# # # # # # # # # # # # # # # # # #
|
||||
# # # Feel free to customize! # # #
|
||||
# # # # # # # # # # # # # # # # # #
|
||||
|
||||
# To customize symbols (e.g MLH_AT_SYMBOL), simply set them as environment variables
|
||||
# for example in your ~/.zshrc file, like this:
|
||||
# MLH_AT_SYMBOL=" at "
|
||||
#
|
||||
# Settings *must* be set before sourcing oh-my-zsh.sh the .zshrc file.
|
||||
#
|
||||
# To easily discover colors and their codes, type `spectrum_ls` in the terminal
|
||||
|
||||
# right prompt default settings
|
||||
if [ -z "$MLH_PRINT_EXIT_CODE" ]; then
|
||||
MLH_PRINT_EXIT_CODE=true
|
||||
fi
|
||||
|
||||
if [ -z "$MLH_PRINT_TIME" ]; then
|
||||
MLH_PRINT_TIME=false
|
||||
fi
|
||||
|
||||
# left prompt symbols default settings
|
||||
|
||||
if [ -z "$MLH_AT_SYMBOL" ]; then
|
||||
MLH_AT_SYMBOL="@"
|
||||
fi
|
||||
|
||||
if [ -z "$MLH_IN_SYMBOL" ]; then
|
||||
MLH_IN_SYMBOL=" in "
|
||||
fi
|
||||
|
||||
if [ -z "$MLH_ON_SYMBOL" ]; then
|
||||
MLH_ON_SYMBOL=" on "
|
||||
fi
|
||||
|
||||
if [ -z "$MLH_SHELL_SYMBOL" ]; then
|
||||
MLH_SHELL_SYMBOL="$ "
|
||||
fi
|
||||
|
||||
if [ -z "$MLH_SHELL_SYMBOL_ROOT" ]; then
|
||||
MLH_SHELL_SYMBOL_ROOT="# "
|
||||
fi
|
||||
|
||||
# colors
|
||||
USER_COLOR="%F{001}"
|
||||
DEVICE_COLOR="%F{033}"
|
||||
DIR_COLOR="%F{220}"
|
||||
BRANCH_COLOR="%F{001}"
|
||||
TIME_COLOR="%F{033}"
|
||||
|
||||
username() {
|
||||
echo "$USER_COLOR%n%f"
|
||||
}
|
||||
|
||||
# Prints device name
|
||||
device() {
|
||||
echo "$DEVICE_COLOR%m%f"
|
||||
}
|
||||
|
||||
# Prints the current directory
|
||||
directory() {
|
||||
echo "$DIR_COLOR%1~%f"
|
||||
}
|
||||
|
||||
# Prints current time
|
||||
current_time() {
|
||||
if [ "$MLH_PRINT_TIME" = true ]; then
|
||||
echo " $TIME_COLOR%*%f"
|
||||
fi
|
||||
}
|
||||
|
||||
# Prints exit code of the last executed command
|
||||
exit_code() {
|
||||
if [ "$MLH_PRINT_EXIT_CODE" = true ]; then
|
||||
echo "%(?..%F{001}exit %?)%f"
|
||||
fi
|
||||
}
|
||||
|
||||
prompt_end() {
|
||||
if [ "$UID" -eq 0 ]; then
|
||||
printf "\n$MLH_SHELL_SYMBOL_ROOT"
|
||||
else
|
||||
printf "\n$MLH_SHELL_SYMBOL"
|
||||
fi
|
||||
}
|
||||
|
||||
# Set git_prompt_info text
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="${MLH_ON_SYMBOL}${BRANCH_COLOR}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%f"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# %B and %b make the text bold
|
||||
PROMPT='%b$(username)$MLH_AT_SYMBOL$(device)$MLH_IN_SYMBOL$(directory)$(git_prompt_info)%b$(prompt_end)'
|
||||
RPROMPT="$(exit_code)$(current_time)"
|
71
dot_oh-my-zsh/themes/mortalscumbag.zsh-theme
Normal file
71
dot_oh-my-zsh/themes/mortalscumbag.zsh-theme
Normal file
|
@ -0,0 +1,71 @@
|
|||
function my_git_prompt() {
|
||||
tester=$(git rev-parse --git-dir 2> /dev/null) || return
|
||||
|
||||
INDEX=$(git status --porcelain 2> /dev/null)
|
||||
STATUS=""
|
||||
|
||||
# is branch ahead?
|
||||
if $(echo "$(git log origin/$(git_current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
|
||||
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_AHEAD"
|
||||
fi
|
||||
|
||||
# is branch behind?
|
||||
if $(echo "$(git log HEAD..origin/$(git_current_branch) 2> /dev/null)" | grep '^commit' &> /dev/null); then
|
||||
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_BEHIND"
|
||||
fi
|
||||
|
||||
# is anything staged?
|
||||
if $(echo "$INDEX" | command grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then
|
||||
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_STAGED"
|
||||
fi
|
||||
|
||||
# is anything unstaged?
|
||||
if $(echo "$INDEX" | command grep -E -e '^[ MARC][MD] ' &> /dev/null); then
|
||||
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
|
||||
fi
|
||||
|
||||
# is anything untracked?
|
||||
if $(echo "$INDEX" | grep '^?? ' &> /dev/null); then
|
||||
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED"
|
||||
fi
|
||||
|
||||
# is anything unmerged?
|
||||
if $(echo "$INDEX" | command grep -E -e '^(A[AU]|D[DU]|U[ADU]) ' &> /dev/null); then
|
||||
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"
|
||||
fi
|
||||
|
||||
if [[ -n $STATUS ]]; then
|
||||
STATUS=" $STATUS"
|
||||
fi
|
||||
|
||||
echo "$ZSH_THEME_GIT_PROMPT_PREFIX$(my_current_branch)$STATUS$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
}
|
||||
|
||||
function my_current_branch() {
|
||||
echo $(git_current_branch || echo "(no branch)")
|
||||
}
|
||||
|
||||
function ssh_connection() {
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
echo "%{$fg_bold[red]%}(ssh) "
|
||||
fi
|
||||
}
|
||||
|
||||
function _toolbox_prompt_info() {
|
||||
if typeset -f toolbox_prompt_info > /dev/null; then
|
||||
toolbox_prompt_info
|
||||
fi
|
||||
}
|
||||
|
||||
local ret_status="%(?:%{$fg_bold[green]%}:%{$fg_bold[red]%})%?%{$reset_color%}"
|
||||
PROMPT=$'\n$(_toolbox_prompt_info)$(ssh_connection)%{$fg_bold[green]%}%n@%m%{$reset_color%}$(my_git_prompt) : %~\n[${ret_status}] %# '
|
||||
|
||||
ZSH_THEME_PROMPT_RETURNCODE_PREFIX="%{$fg_bold[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" $fg[white]‹ %{$fg_bold[yellow]%}"
|
||||
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[magenta]%}↑"
|
||||
ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_bold[green]%}↓"
|
||||
ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_bold[green]%}●"
|
||||
ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg_bold[red]%}●"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[white]%}●"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[red]%}✕"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=" $fg_bold[white]›%{$reset_color%}"
|
7
dot_oh-my-zsh/themes/mrtazz.zsh-theme
Normal file
7
dot_oh-my-zsh/themes/mrtazz.zsh-theme
Normal file
|
@ -0,0 +1,7 @@
|
|||
PROMPT='%{$fg_bold[red]%}%m%{$reset_color%}:%{$fg[cyan]%}%c%{$reset_color%}:%# '
|
||||
RPROMPT='%{$fg_bold[green]%}$(git_prompt_info)%{$reset_color%}% '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="<%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%} %{$fg[yellow]%}✗%{$fg[green]%}>%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}>"
|
14
dot_oh-my-zsh/themes/murilasso.zsh-theme
Normal file
14
dot_oh-my-zsh/themes/murilasso.zsh-theme
Normal file
|
@ -0,0 +1,14 @@
|
|||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
|
||||
local current_dir='%{$terminfo[bold]$fg[blue]%}%~%{$reset_color%}'
|
||||
local rvm_ruby='%{$fg[red]%}$(ruby_prompt_info)%{$reset_color%}'
|
||||
local git_branch='%{$fg[blue]%}$(git_prompt_info)%{$reset_color%}'
|
||||
|
||||
PROMPT="${user_host}:${current_dir} ${rvm_ruby}
|
||||
${git_branch} %B$%b "
|
||||
RPS1="${return_code}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}"
|
16
dot_oh-my-zsh/themes/muse.zsh-theme
Normal file
16
dot_oh-my-zsh/themes/muse.zsh-theme
Normal file
|
@ -0,0 +1,16 @@
|
|||
PROMPT="${FG[117]}%~%{$reset_color%}\$(git_prompt_info)\$(virtualenv_prompt_info)${FG[133]}\$(git_prompt_status) ${FG[077]}ᐅ%{$reset_color%} "
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" ${FG[012]}("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="${FG[012]})%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" ${FG[133]}✘"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=" ${FG[118]}✔"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="${FG[082]}✚%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="${FG[166]}✹%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="${FG[160]}✖%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="${FG[220]}➜%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="${FG[082]}═%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="${FG[190]}✭%{$reset_color%}"
|
||||
|
||||
ZSH_THEME_VIRTUALENV_PREFIX=" ["
|
||||
ZSH_THEME_VIRTUALENV_SUFFIX="]"
|
7
dot_oh-my-zsh/themes/nanotech.zsh-theme
Normal file
7
dot_oh-my-zsh/themes/nanotech.zsh-theme
Normal file
|
@ -0,0 +1,7 @@
|
|||
PROMPT='%F{green}%2c%F{blue} [%f '
|
||||
RPROMPT='$(git_prompt_info) %F{blue}] %F{green}%D{%L:%M} %F{yellow}%D{%p}%f'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%f"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %F{red}*%f"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
21
dot_oh-my-zsh/themes/nebirhos.zsh-theme
Normal file
21
dot_oh-my-zsh/themes/nebirhos.zsh-theme
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Based on robbyrussell's theme, with host and rvm indicators. Example:
|
||||
# @host ➜ currentdir rvm:(rubyversion@gemset) git:(branchname)
|
||||
|
||||
# Get the current ruby version in use with RVM:
|
||||
if [ -e ~/.rvm/bin/rvm-prompt ]; then
|
||||
RUBY_PROMPT_="%{$fg_bold[blue]%}rvm:(%{$fg[green]%}\$(~/.rvm/bin/rvm-prompt s i v g)%{$fg_bold[blue]%})%{$reset_color%} "
|
||||
else
|
||||
if which rbenv &> /dev/null; then
|
||||
RUBY_PROMPT_="%{$fg_bold[blue]%}rbenv:(%{$fg[green]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg_bold[blue]%})%{$reset_color%} "
|
||||
fi
|
||||
fi
|
||||
|
||||
# Get the host name (first 4 chars)
|
||||
HOST_PROMPT_="%{$fg_bold[red]%}@%m ➜ %{$fg_bold[cyan]%}%c "
|
||||
GIT_PROMPT="%{$fg_bold[blue]%}\$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}"
|
||||
PROMPT="$HOST_PROMPT_$RUBY_PROMPT_$GIT_PROMPT"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
43
dot_oh-my-zsh/themes/nicoulaj.zsh-theme
Normal file
43
dot_oh-my-zsh/themes/nicoulaj.zsh-theme
Normal file
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env zsh
|
||||
# ------------------------------------------------------------------------------
|
||||
# Prompt for the Zsh shell:
|
||||
# * One line.
|
||||
# * VCS info on the right prompt.
|
||||
# * Only shows the path on the left prompt by default.
|
||||
# * Crops the path to a defined length and only shows the path relative to
|
||||
# the current VCS repository root.
|
||||
# * Wears a different color whether the last command succeeded/failed.
|
||||
# * Shows user@hostname if connected through SSH.
|
||||
# * Shows if logged in as root or not.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# Customizable parameters.
|
||||
PROMPT_PATH_MAX_LENGTH=30
|
||||
PROMPT_DEFAULT_END=❯
|
||||
PROMPT_ROOT_END=❯❯❯
|
||||
PROMPT_SUCCESS_COLOR=$FG[071]
|
||||
PROMPT_FAILURE_COLOR=$FG[124]
|
||||
PROMPT_VCS_INFO_COLOR=$FG[242]
|
||||
|
||||
# Set required options.
|
||||
setopt promptsubst
|
||||
|
||||
# Load required modules.
|
||||
autoload -U add-zsh-hook
|
||||
autoload -Uz vcs_info
|
||||
|
||||
# Add hook for calling vcs_info before each command.
|
||||
add-zsh-hook precmd vcs_info
|
||||
|
||||
# Set vcs_info parameters.
|
||||
zstyle ':vcs_info:*' enable hg bzr git
|
||||
zstyle ':vcs_info:*:*' check-for-changes true # Can be slow on big repos.
|
||||
zstyle ':vcs_info:*:*' unstagedstr '!'
|
||||
zstyle ':vcs_info:*:*' stagedstr '+'
|
||||
zstyle ':vcs_info:*:*' actionformats "%S" "%r/%s/%b %u%c (%a)"
|
||||
zstyle ':vcs_info:*:*' formats "%S" "%r/%s/%b %u%c"
|
||||
zstyle ':vcs_info:*:*' nvcsformats "%~" ""
|
||||
|
||||
# Define prompts.
|
||||
PROMPT="%(0?.%{$PROMPT_SUCCESS_COLOR%}.%{$PROMPT_FAILURE_COLOR%})${SSH_TTY:+[%n@%m]}%{$FX[bold]%}%$PROMPT_PATH_MAX_LENGTH<..<"'${vcs_info_msg_0_%%.}'"%<<%(!.$PROMPT_ROOT_END.$PROMPT_DEFAULT_END)%{$FX[no-bold]%}%{$FX[reset]%} "
|
||||
RPROMPT="%{$PROMPT_VCS_INFO_COLOR%}"'$vcs_info_msg_1_'"%{$FX[reset]%}"
|
7
dot_oh-my-zsh/themes/norm.zsh-theme
Normal file
7
dot_oh-my-zsh/themes/norm.zsh-theme
Normal file
|
@ -0,0 +1,7 @@
|
|||
PROMPT='%{$fg[yellow]%}λ %m %{$fg[green]%}%c %{$fg[yellow]%}→ $(git_prompt_info)$(hg_prompt_info)%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="λ %{$fg[blue]%}git %{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%} → %{$reset_color%}"
|
||||
ZSH_THEME_HG_PROMPT_PREFIX="λ %{$fg[blue]%}hg %{$fg[red]%}"
|
||||
ZSH_THEME_HG_PROMPT_SUFFIX="%{$fg[yellow]%} → %{$reset_color%}"
|
||||
|
10
dot_oh-my-zsh/themes/obraun.zsh-theme
Normal file
10
dot_oh-my-zsh/themes/obraun.zsh-theme
Normal file
|
@ -0,0 +1,10 @@
|
|||
if [ "$USERNAME" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
|
||||
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
PROMPT='%{$fg[green]%}[%D{%H:%M:%S}]%{$reset_color%} %{$fg_no_bold[cyan]%}%n %{${fg_bold[blue]}%}::%{$reset_color%} %{$fg[yellow]%}%m%{$reset_color%} %{$fg_no_bold[magenta]%} ➜ %{$reset_color%} %{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} '
|
||||
|
||||
RPS1="${return_code}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}‹"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
|
24
dot_oh-my-zsh/themes/oldgallois.zsh-theme
Normal file
24
dot_oh-my-zsh/themes/oldgallois.zsh-theme
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Depends on the git plugin for work_in_progress()
|
||||
(( $+functions[work_in_progress] )) || work_in_progress() {}
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}["
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# Customized git status, oh-my-zsh currently does not allow render dirty status before branch
|
||||
git_custom_status() {
|
||||
local branch=$(git_current_branch)
|
||||
[[ -n "$branch" ]] || return 0
|
||||
echo "$(parse_git_dirty)\
|
||||
%{${fg_bold[yellow]}%}$(work_in_progress)%{$reset_color%}\
|
||||
${ZSH_THEME_GIT_PROMPT_PREFIX}${branch}${ZSH_THEME_GIT_PROMPT_SUFFIX}"
|
||||
}
|
||||
|
||||
# RVM component of prompt
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}["
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="]%{$reset_color%}"
|
||||
|
||||
# Combine it all into a final right-side prompt
|
||||
RPS1="\$(git_custom_status)\$(ruby_prompt_info)${RPS1:+ $RPS1}"
|
||||
PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b '
|
47
dot_oh-my-zsh/themes/peepcode.zsh-theme
Normal file
47
dot_oh-my-zsh/themes/peepcode.zsh-theme
Normal file
|
@ -0,0 +1,47 @@
|
|||
#
|
||||
# Based on Geoffrey Grosenbach's peepcode zsh theme from
|
||||
# https://github.com/topfunky/zsh-simple
|
||||
#
|
||||
|
||||
git_repo_path() {
|
||||
command git rev-parse --git-dir 2>/dev/null
|
||||
}
|
||||
|
||||
git_commit_id() {
|
||||
command git rev-parse --short HEAD 2>/dev/null
|
||||
}
|
||||
|
||||
git_mode() {
|
||||
if [[ -e "$repo_path/BISECT_LOG" ]]; then
|
||||
echo "+bisect"
|
||||
elif [[ -e "$repo_path/MERGE_HEAD" ]]; then
|
||||
echo "+merge"
|
||||
elif [[ -e "$repo_path/rebase" || -e "$repo_path/rebase-apply" || -e "$repo_path/rebase-merge" || -e "$repo_path/../.dotest" ]]; then
|
||||
echo "+rebase"
|
||||
fi
|
||||
}
|
||||
|
||||
git_dirty() {
|
||||
if [[ "$repo_path" != '.' && -n "$(command git ls-files -m)" ]]; then
|
||||
echo " %{$fg_bold[grey]%}✗%{$reset_color%}"
|
||||
fi
|
||||
}
|
||||
|
||||
git_prompt() {
|
||||
local cb=$(git_current_branch)
|
||||
if [[ -n "$cb" ]]; then
|
||||
local repo_path=$(git_repo_path)
|
||||
echo " %{$fg_bold[grey]%}$cb %{$fg[white]%}$(git_commit_id)%{$reset_color%}$(git_mode)$(git_dirty)"
|
||||
fi
|
||||
}
|
||||
|
||||
local smiley='%(?.%F{green}☺%f.%F{red}☹%f)'
|
||||
|
||||
PROMPT='
|
||||
${VIRTUAL_ENV:+"($VIRTUAL_ENV) "}%~
|
||||
${smiley} '
|
||||
|
||||
RPROMPT='%F{white} $(ruby_prompt_info)$(git_prompt)%{$reset_color%}'
|
||||
|
||||
# Disable automatic virtualenv prompt change
|
||||
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue