mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
Merge remote-tracking branch 'robbyrussell/master'
This commit is contained in:
commit
86b8827d27
16 changed files with 139 additions and 97 deletions
22
themes/alanpeabody.zsh-theme
Normal file
22
themes/alanpeabody.zsh-theme
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}'
|
||||
local pwd='%{$fg[blue]%}%~%{$reset_color%}'
|
||||
local rvm='%{$fg[green]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
|
||||
local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})'
|
||||
local git_branch='$(git_prompt_status)%{$reset_color%}$(git_prompt_info)%{$reset_color%}'
|
||||
|
||||
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]%} ✭"
|
||||
|
||||
PROMPT="${user} ${pwd}$ "
|
||||
RPROMPT="${return_code} ${git_branch} ${rvm}"
|
||||
|
||||
26
themes/humza.zsh-theme
Normal file
26
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%}"
|
||||
8
themes/miloshadzic.zsh-theme
Normal file
8
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%} '
|
||||
17
themes/nebirhos.zsh-theme
Normal file
17
themes/nebirhos.zsh-theme
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# 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%} "
|
||||
fi
|
||||
|
||||
# Get the host name (first 4 chars)
|
||||
HOST_PROMPT_="%{$fg_bold[red]%}@$HOST[0,4] ➜ %{$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]%})"
|
||||
26
themes/sunaku.zsh-theme
Normal file
26
themes/sunaku.zsh-theme
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Git-centric variation of the "fishy" theme.
|
||||
# See screenshot at http://ompldr.org/vOHcwZg
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}+"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[magenta]%}!"
|
||||
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[yellow]%}?"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=" "
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
local user_color='green'
|
||||
test $UID -eq 0 && user_color='red'
|
||||
|
||||
PROMPT='%(?..%{$fg_bold[red]%}exit %?
|
||||
%{$reset_color%})'\
|
||||
'%{$bold_color%}$(git_prompt_status)%{$reset_color%}'\
|
||||
'$(git_prompt_info)'\
|
||||
'%{$fg[$user_color]%}%~%{$reset_color%}'\
|
||||
'%(!.#.>) '
|
||||
|
||||
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
function prompt_char {
|
||||
git branch >/dev/null 2>/dev/null && echo '±' && return
|
||||
hg root >/dev/null 2>/dev/null && echo '☿' && return
|
||||
echo '○'
|
||||
}
|
||||
|
||||
function virtualenv_info {
|
||||
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
PROMPT='
|
||||
%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(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=""
|
||||
|
||||
. ~/bin/dotfiles/zsh/aliases
|
||||
Loading…
Add table
Add a link
Reference in a new issue