Added a couple more themes and put colors into its own file
parent
1f923a90ad
commit
70c3b523b3
|
|
@ -49,6 +49,7 @@ do
|
|||
source $config_file
|
||||
done
|
||||
|
||||
export PS1=$PROMPT
|
||||
|
||||
#
|
||||
# Custom Help
|
||||
|
|
|
|||
|
|
@ -8,21 +8,13 @@ export PATH=$PATH:~/.gem/ruby/1.8/bin:/opt/nginx/sbin
|
|||
|
||||
# Path to the bash it configuration
|
||||
export BASH=$HOME/.bash_it
|
||||
export LOAD_COLORS=$BASH/themes/base.theme.bash
|
||||
|
||||
# Lock and Load a custom theme file
|
||||
# location /.bash_it/themes/
|
||||
export BASH_THEME='bobby'
|
||||
|
||||
# Load the color configuration file, if you want to add colors to the GIT THEME PROMPTs
|
||||
source $LOAD_COLORS
|
||||
|
||||
# Your place for hosting Git repos. I use this for private repos.
|
||||
export GIT_HOSTING='git@git.domain.com'
|
||||
export GIT_THEME_PROMPT_DIRTY=' ${RED}✗${LIGHT_GREEN}' # This shows how to use sample the colors
|
||||
export GIT_THEME_PROMPT_CLEAN=' ✓'
|
||||
export GIT_THEME_PROMPT_PREFIX='('
|
||||
export GIT_THEME_PROMPT_SUFFIX=')'
|
||||
|
||||
# Set my editor and git editor
|
||||
export EDITOR="/usr/bin/mate -w"
|
||||
|
|
|
|||
|
|
@ -1,35 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Normal Colors
|
||||
GREEN=$'\e[0;32m'
|
||||
RED=$'\e[0;31m'
|
||||
BLUE=$'\e[0;34m'
|
||||
WHITE=$'\e[1;37m'
|
||||
BLACK=$'\e[0;30m'
|
||||
YELLOW=$'\e[0;33m'
|
||||
PURPLE=$'\e[0;35m'
|
||||
CYAN=$'\e[0;36m'
|
||||
GRAY=$'\e[1;30m'
|
||||
PINK=$'\e[37;1;35m'
|
||||
ORANGE=$'\e[33;40m'
|
||||
|
||||
# Revert color back to the normal color
|
||||
NORMAL=$'\e[00m'
|
||||
|
||||
# LIGHT COLORS
|
||||
LIGHT_GREEN=$'\e[1;32m'
|
||||
LIGHT_RED=$'\e[1;31m'
|
||||
LIGHT_BLUE=$'\e[1;34m'
|
||||
LIGHT_YELLOW=$'\e[1;33m'
|
||||
LIGHT_PURPLE=$'\e[1;35m'
|
||||
LIGHT_CYAN=$'\e[1;36m'
|
||||
LIGHT_GRAY=$'\e[0;37m'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Stolen from Steve Losh
|
||||
function prompt_char {
|
||||
git branch >/dev/null 2>/dev/null && echo '±' && return
|
||||
|
|
@ -45,7 +15,7 @@ function parse_git_dirty {
|
|||
fi
|
||||
}
|
||||
|
||||
function parse_git_branch {
|
||||
function git_prompt_info() {
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||
echo "$GIT_THEME_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$GIT_THEME_PROMPT_SUFFIX"
|
||||
}
|
||||
|
|
@ -1,2 +1,10 @@
|
|||
#!/bin/bash
|
||||
export PS1='${LIGHT_BLUE}$(prompt_char)${LIGHT_GREEN}$(parse_git_branch) ${ORANGE}\h ${NORMAL}in ${GREEN}\w ${NORMAL}→ '
|
||||
|
||||
# prompt themeing
|
||||
PROMPT='\n${bold_blue}$(prompt_char)$(git_prompt_info) ${orange}\h ${reset_color}in ${green}\w ${reset_color}→ '
|
||||
|
||||
# git themeing
|
||||
GIT_THEME_PROMPT_DIRTY=" ${red}✗"
|
||||
GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓"
|
||||
GIT_THEME_PROMPT_PREFIX=" ${green}|"
|
||||
GIT_THEME_PROMPT_SUFFIX="${green}|"
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
PROMPT='${green}\u@\h ${blue}\T ${reset_color}${white}\w${reset_color}$(git_prompt_info)${blue} →${bold_blue} \$${reset_color} '
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
if [ "$(whoami)" = root ]; then no_color=$red; else no_color=$white; fi
|
||||
|
||||
PROMPT='${no_color}\u${reset_color}:${blue}\W/${reset_color} $(git_prompt_info)$ '
|
||||
RPROMPT='[\t]'
|
||||
|
||||
|
||||
# git theming
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="${bold_blue}(${yellow}%B"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%b${bold_blue})${reset_color} "
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="${bold_red}✗"
|
||||
|
||||
|
||||
# LS colors, made with http://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:'
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
green=$'\e[0;32m'
|
||||
red=$'\e[0;31m'
|
||||
blue=$'\e[0;34m'
|
||||
white=$'\e[1;37m'
|
||||
black=$'\e[0;30m'
|
||||
yellow=$'\e[0;33m'
|
||||
purple=$'\e[0;35m'
|
||||
cyan=$'\e[0;36m'
|
||||
orange=$'\e[33;40m'
|
||||
|
||||
|
||||
bold_green=$'\e[1;32m'
|
||||
bold_red=$'\e[1;31m'
|
||||
bold_blue=$'\e[1;34m'
|
||||
bold_yellow=$'\e[1;33m'
|
||||
bold_purple=$'\e[1;35m'
|
||||
bold_cyan=$'\e[1;36m'
|
||||
bold_orange=$'\e[1;33;40m'
|
||||
|
||||
normal=$'\e[00m'
|
||||
reset_color=$'\e[39m'
|
||||
Loading…
Reference in New Issue