7 changed files with 71 additions and 27 deletions
			
			
		@ -0,0 +1,39 @@ | 
				
			|||||||
 | 
					# Use the iterm2 material theme in the root directory of the essentials repository. For linux, | 
				
			||||||
 | 
					# you will need to source a material theme color scheme for your terminal. | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [[ "$OSTYPE" == "darwin"* ]]; then | 
				
			||||||
 | 
						if [ -f ~/.macrc ]; then | 
				
			||||||
 | 
					        	source ~/.macrc | 
				
			||||||
 | 
						fi | 
				
			||||||
 | 
					fi | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					parse_git_branch() { | 
				
			||||||
 | 
					    git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | 
				
			||||||
 | 
					} | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# If you ever needed weather... | 
				
			||||||
 | 
					weather() { | 
				
			||||||
 | 
					    curl wttr.in | 
				
			||||||
 | 
					} | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Test for the `bash-completion` package. Installing this adds better tab completion to bash. | 
				
			||||||
 | 
					[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh" | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Ignore duplicates in history to make history less of a hassle to use. | 
				
			||||||
 | 
					export HISTCONTROL=ignoredups | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Better color handling so scrolling doesn't get broken. | 
				
			||||||
 | 
					# Note for Cygwin you need ncurses for this to work. | 
				
			||||||
 | 
					reset=$(tput sgr0) | 
				
			||||||
 | 
					green=$(tput setaf 2) | 
				
			||||||
 | 
					blue=$(tput setaf 4) | 
				
			||||||
 | 
					white=$(tput setaf 7) | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bold=$(tput bold || tput md) | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export PROMPT_DIRTRIM=2 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Important note for PS1 modification - everything non-printable must be escaped with `\[` and `\]`. Otherwise readline | 
				
			||||||
 | 
					# fails to track the prompt right and things get messed up when you input long strings. | 
				
			||||||
 | 
					export PS1=\ | 
				
			||||||
 | 
					'\[$bold\]\[$white\]\u@\h\[$reset\]: \[$bold\]\[$blue\]\w\[$reset\] \[$green\]\[$(parse_git_branch)\]\[$reset\]\[$bold\]\[$white\]>\[$reset\] ' | 
				
			||||||
@ -0,0 +1,12 @@ | 
				
			|||||||
 | 
					# Directory colors - note OS X does not use coreutils so dircolors doesn't work. | 
				
			||||||
 | 
					export CLICOLOR=YES | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Custom directory colors | 
				
			||||||
 | 
					# Ex = Directory color - Bold blue, normal background (to match the $PS1 line) | 
				
			||||||
 | 
					# bx = Symlink color - Red, normal background | 
				
			||||||
 | 
					# Cx = Socket color - Bold green, normal background  | 
				
			||||||
 | 
					# dx = Pipe color - Default | 
				
			||||||
 | 
					# Gx = Executable color - bold cyan | 
				
			||||||
 | 
					# The rest are default colors taken from `man ls` | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export LSCOLORS="ExbxCxdxGxegedabagacad" | 
				
			||||||
@ -1,14 +0,0 @@ | 
				
			|||||||
# Use the iterm2 material theme in the root directory of the essentials repository. For linux, | 
					 | 
				
			||||||
# you will need to source a material theme color scheme for your terminal. | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
parse_git_branch() { | 
					 | 
				
			||||||
    git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | 
					 | 
				
			||||||
} | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# If you ever needed weather... | 
					 | 
				
			||||||
weather() { | 
					 | 
				
			||||||
    curl wttr.in | 
					 | 
				
			||||||
} | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export PROMPT_DIRTRIM=2 | 
					 | 
				
			||||||
export PS1="\e[1;37m\u@\h\e[m: \e[1;34m\w\e[m \e[1;32m\[$(parse_git_branch)\]\e[m> " | 
					 | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue