From 73b097ba124a95769f760e55569b34335061f2b5 Mon Sep 17 00:00:00 2001 From: Armin Date: Thu, 29 Jan 2015 20:45:43 +0100 Subject: [PATCH 1/4] add zshrc --- zshrc | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 zshrc diff --git a/zshrc b/zshrc new file mode 100644 index 000000000..c3f4f2c28 --- /dev/null +++ b/zshrc @@ -0,0 +1,169 @@ +# ezzsh - zshrc + +# path to your zsh configuration. +ZSH=.zsh + +# export ZSH_THEME="random" +export ZSH_THEME="ezzsh" # name of zsh theme + +# Set this to true to use case-sensitive completion +CASE_SENSITIVE="false" # bool + +# Comment this out to disable weekly auto-update checks +DISABLE_AUTO_UPDATE="true" # bool + +# Uncomment following line if you want to disable colors in ls +DISABLE_LS_COLORS="false" # bool + +# Uncomment following line if you want to disable autosetting terminal title. +DISABLE_AUTO_TITLE="false" # bool + +# Uncomment following line if you want disable red dots displayed while waiting for completion +DISABLE_COMPLETION_WAITING_DOTS="false" # bool + +# plugins to load (array) +# Example format: plugins=(rails git textmate ruby lighthouse) +plugins=(git) + + +# Customize to your needs... +source $ZSH/zsh + +alias ls='ls --color=auto --group-directories-first -F' + +# workaround for broken xfce4 terminal to force $TERM: +if [[ "$COLORTERM" == "xfce4-terminal" ]]; then + export TERM="xterm-256color" +fi + +# workaround for rxvt +if [[ "$COLORTERM" == "rxvt-xpm" ]]; then + export TERM="rxvt-unicode-256color" +fi + +# set $OS_TYPE to "osx" / "linux": +if [[ "$(uname)" == "Darwin" ]]; then + export OS_TYPE="osx" +else + export OS_TYPE="linux" +fi + +# $ZSH - Path to your zsh installation. +export ZSH=$HOME/.zsh/ + +export PATH=$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH + +# set $EDITOR +export EDITOR='vim' + +# man pages: color +export LESS_TERMCAP_mb=$'\E[01;31m' +export LESS_TERMCAP_md=$'\E[01;33m' +export LESS_TERMCAP_me=$'\E[0m' +export LESS_TERMCAP_se=$'\E[0m' +export LESS_TERMCAP_so=$'\E[01;44;33m' +export LESS_TERMCAP_ue=$'\E[0m' +export LESS_TERMCAP_us=$'\E[01;32m' + +# zsh fix for ssh host completion from ~/.ssh/config +[ -f ~/.ssh/config ] && : ${(A)ssh_config_hosts:=${${${${(@M)${(f)"$(<~/.ssh/config)"}:#Host *}#Host }:#*\**}:#*\?*}} + +# needed to keep backgrounded jobs running when exiting zsh: +setopt NO_HUP + +# homebrew +# githup api token, in the format, example: +# > export HOMEBREW_GITHUB_API_TOKEN=XXXXX +if [[ -e ~/.homebrew-github-api-token ]]; then + source ~/.homebrew-github-api-token +fi + +# mosh setup +# export MOSH_TITLE_NOPREFIX=1 + +# jump/mark/unmark/marks stuff (make sure to load the "jump" plugin in plugins=() ) +function _completemarks { + reply=($(ls $MARKPATH)) +} +compctl -K _completemarks jump +compctl -K _completemarks unmark + +# force english locales +export LC_CTYPE="en_US.UTF-8" +export LC_NUMERIC="en_US.UTF-8" +export LC_TIME="en_US.UTF-8" +export LC_COLLATE="en_US.UTF-8" +export LC_MONETARY="en_US.UTF-8" +export LC_MESSAGES="en_US.UTF-8" +export LC_PAPER="en_US.UTF-8" +export LC_NAME="en_US.UTF-8" +export LC_ADDRESS="en_US.UTF-8" +export LC_TELEPHONE="en_US.UTF-8" +export LC_MEASUREMENT="en_US.UTF-8" +export LC_IDENTIFICATION="en_US.UTF-8" +export LC_ALL="en_US.UTF-8" + +# set ls options +LS_OPTIONS="--color=auto --group-directories-first -F" + +# Mac OS X specific stuff: +if [[ "$OS_TYPE" == "osx" ]]; then + # preceed path with homebrew stuff: + export PATH="/usr/local/sbin:/usr/local/bin:$PATH" + # ipython on mac: + alias ipython='/Users/armin/git/ipython/bin/ipython' + # homebrew verbosity / emoji icon removal: + export HOMEBREW_VERBOSE=1 + export HOMEBREW_CURL_VERBOSE=1 + export HOMEBREW_NO_EMOJI=1 + # let's use ls from gnu utils because the bsd ls doesn't know long options: + if hash gls; then + LS_COMMAND="gls" + else + LS_COMMAND="ls" + fi + # homebrew verbose and without annoying emoji icon: + export HOMEBREW_VERBOSE=1 + export HOMEBREW_CURL_VERBOSE=1 + export HOMEBREW_NO_EMOJI=1 + # let's use dircolors from gnu utils because the osx version is buggy: + alias dircolors="gdircolors" +# Linux specific stuff +else + LS_COMMAND="ls" +fi + +# enable ls colorization: +if [ "$TERM" != "dumb" ]; then + eval "$(dircolors "$ZSH"/dircolors)" + alias ls="$LS_COMMAND $LS_OPTIONS" +fi + +# set $SHELL: +export SHELL="$(which zsh)" + +# keychain stuff +if [[ "$OS_TYPE" == "linux" ]]; then + ssh_cmd="$(which ssh)" + function ssh () { + echo "$@" >> $HOME/.keychain-args + echo "$(date)" > $HOME/.keychain-output + # using keychain for gpg made problems, so we only use the id_rsa SSH key here: + # keychain id_rsa 44248BA0 + keychain id_rsa >> $HOME/.keychain-output 2>&1 + [ -z "$HOSTNAME" ] && HOSTNAME=`uname -n` + [ -f $HOME/.keychain/$HOSTNAME-sh ] && \ + . $HOME/.keychain/$HOSTNAME-sh + [ -f $HOME/.keychain/$HOSTNAME-sh-gpg ] && \ + . $HOME/.keychain/$HOSTNAME-sh-gpg + "$ssh_cmd" "$@" + } +fi + +# grep with color +alias grep='grep --color=auto' + +# don't autocorrect sudo command (fixes "zsh: correct 'vim' to '.vim' [nyae]?" bug) +alias sudo='nocorrect sudo' + + From 341349ac777809a46a9abc7a27f312169f9c6707 Mon Sep 17 00:00:00 2001 From: Armin Jenewein Date: Fri, 30 Jan 2015 10:59:31 +0100 Subject: [PATCH 2/4] add my own powerline zsh theme --- themes/powerline.zsh-theme | 206 +++++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 themes/powerline.zsh-theme diff --git a/themes/powerline.zsh-theme b/themes/powerline.zsh-theme new file mode 100644 index 000000000..465a0e80b --- /dev/null +++ b/themes/powerline.zsh-theme @@ -0,0 +1,206 @@ +# vim:ft=zsh ts=2 sw=2 sts=2 +# +# powerline theme - based on agnoster's theme - https://gist.github.com/3712874 +# +# I was not satisfied with the agnoster colours so I created my own powerline zsh theme based on the powerline bash +# colour codes. +# --- Armin +# +# In order for this theme to render correctly, you will need a +# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts). +# + +### Segment drawing +# A few utility functions to make it easy and re-usable to draw segmented prompts + +CURRENT_BG='NONE' +SEGMENT_SEPARATOR='' +RSEGMENT_SEPARATOR='' + +# use custom colours: +source "$ZSH"/powerlinecolours + +# Begin left side 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 +} + +# Begin right side segment +# Takes two arguments, background and foreground. Both can be omitted, +# rendering default background/foreground. +prompt_rsegment() { + 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}%}$RSEGMENT_SEPARATOR%{$fg%} " + else + echo -n "%{$bg%}%{$fg%} " + fi + CURRENT_BG=$1 + [[ -n $3 ]] && echo -n $3 +} + +# right side seperator +prompt_rseperator() { + local bg fg +### [[ -n $1 ]] && bg="%K{$1}" || bg="%k" + bg="%k" + [[ -n $2 ]] && fg="%F{$2}" || fg="%f" + echo -n "%{$bg%}%{$fg%}$RSEGMENT_SEPARATOR" + [[ -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 +# TODO: check if $SSH_CLIENT is set and adjust prompt to include hostname of machine +# Context: user@hostname (who am I and where am I) +prompt_context() { + local user="$(whoami)" + if [[ "$user" == "root" ]]; then + # prompt for root + prompt_segment "$prompt_context_root_bg" "$prompt_context_root_fg" "%(!.%{%F{red}%}.)$user" + else + # prompt for normal user + prompt_segment "$prompt_context_user_bg" "$prompt_context_user_fg" "%(!.%{%F{yellow}%}.)$user" + fi +} + +# Git: branch/detached head, dirty status +prompt_git() { + local ref dirty mode repo_path + repo_path=$(git rev-parse --git-dir 2>/dev/null) + + if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then + dirty=$(parse_git_dirty) + ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)" + if [[ -n $dirty ]]; then + prompt_segment yellow black + else + prompt_segment green black + fi + + if [[ -e "${repo_path}/BISECT_LOG" ]]; then + mode=" " + 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:git:*' unstagedstr '●' + zstyle ':vcs_info:*' formats ' %u%c' + zstyle ':vcs_info:*' actionformats ' %u%c' + vcs_info + echo -n "${ref/refs\/heads\// }${vcs_info_msg_0_%% }${mode}" + fi +} + +prompt_hg() { + local rev status + if $(hg id >/dev/null 2>&1); then + if $(hg prompt >/dev/null 2>&1); then + if [[ $(hg prompt "{status|unknown}") = "?" ]]; then + # if files are not added + prompt_segment red white + st='±' + elif [[ -n $(hg prompt "{status|modified}") ]]; then + # if any modification + prompt_segment yellow black + st='±' + else + # if working copy is clean + prompt_segment green black + fi + echo -n $(hg prompt "☿ {rev}@{branch}") $st + else + st="" + rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g') + branch=$(hg id -b 2>/dev/null) + if `hg st | grep -Eq "^\?"`; then + prompt_segment red black + st='±' + elif `hg st | grep -Eq "^(M|A)"`; then + prompt_segment yellow black + st='±' + else + prompt_segment green black + fi + echo -n "☿ $rev@$branch" $st + fi + fi +} + +# Dir: current working directory +prompt_dir() { + prompt_segment 238 grey '%~' +} + +# Virtualenv: current working virtualenv +prompt_virtualenv() { + local virtualenv_path="$VIRTUAL_ENV" + if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then + prompt_segment blue black "(`basename $virtualenv_path`)" + fi +} + +## left prompt +build_prompt() { + RETVAL=$? + prompt_virtualenv + prompt_context + prompt_dir + prompt_git + prompt_hg + prompt_end +} + +## right prompt +build_rprompt() { + RETVAL=$? + local symbols + symbols=() + drawrightprompt=0 + [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙" && drawrightprompt=1 + [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡" && drawrightprompt=1 + [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘ $RETVAL" && drawrightprompt=1 + if [[ "$drawrightprompt" -eq 1 ]]; then + prompt_rseperator %k 238 + fi + [[ -n "$symbols" ]] && prompt_segment 236 default "$symbols" +} + +PROMPT='%{%f%b%k%}$(build_prompt) ' +RPROMPT='%{%f%r%k%}$(build_rprompt) ' + + From 7bf46e87622caaafeb7ca292035161ae58ed2c4c Mon Sep 17 00:00:00 2001 From: Armin Jenewein Date: Fri, 30 Jan 2015 11:03:47 +0100 Subject: [PATCH 3/4] new powerline setup --- README.textile | 73 -------------------------------------- lib/powerlinecolours | 71 ++++++++++++++++++++++++++++++++++++ oh-my-zsh.sh | 53 --------------------------- themes/powerline.zsh-theme | 2 +- zshrc | 5 +-- 5 files changed, 75 insertions(+), 129 deletions(-) delete mode 100644 README.textile create mode 100644 lib/powerlinecolours delete mode 100644 oh-my-zsh.sh diff --git a/README.textile b/README.textile deleted file mode 100644 index 30f7bd304..000000000 --- a/README.textile +++ /dev/null @@ -1,73 +0,0 @@ -A handful of functions, auto-complete helpers, and stuff that makes you shout... - -bq. "OH MY ZSHELL!" - -h2. Setup - -@oh-my-zsh@ should work with any recent release of "zsh":http://www.zsh.org/, the minimum recommended version is 4.3.9. - -h3. The automatic installer... (do you trust me?) - -@wget http://github.com/sjl/oh-my-zsh/raw/master/tools/install.sh -O - | sh@ - -h3. The manual way - - -1. Clone the repository - - @git clone git://github.com/sjl/oh-my-zsh.git ~/.oh-my-zsh@ - -2. Create a new zsh config by copying the zsh template we've provided. - - *NOTE*: If you already have a ~/.zshrc file, you should back it up. @cp ~/.zshrc ~/.zshrc.orig@ in case you want to go back to your original settings. - - @cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc@ - -3. Set zsh as your default shell: - - @chsh -s /bin/zsh@ - -4. Start / restart zsh (open a new terminal is easy enough...) - -h3. Problems? - -You _might_ need to modify your PATH in ~/.zshrc if you're not able to find some commands after switching to _Oh My Zsh_. - -h2. Usage - -* enable the plugins you want in your @~/.zshrc@ (take a look at @plugins/@ to see what's possible) -** example: @plugins=(git osx ruby)@ -* Theme support: Change the @ZSH_THEME@ environment variable in @~/.zshrc@. -** Take a look at the "current themes":http://wiki.github.com/sjl/oh-my-zsh/themes that come bundled with _Oh My Zsh_. -* much much more... take a look at @lib/@ what _Oh My Zsh_ offers... - -h2. Useful - -the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty for tips. - -h3. Customization - -If you want to override any of the default behavior, just add a new file (ending in @.zsh@) into the @custom/@ directory. -If you have many functions which go good together you can put them as a *.plugin.zsh file in the @custom/plugins/@ directory and then enable this plugin. -If you would like to override the functionality of a plugin distributed with oh-my-zsh, create a plugin of the same name in the @custom/plugins/@ directory and it will be loaded instead of the one in @plugins/@. - - -h3. Uninstalling - -If you want to uninstall it, just run @uninstall_oh_my_zsh@ from the command line and it'll remove itself and revert you to bash (or your previous zsh config). - -h2. Help out! - -I'm far from being a zsh-expert and suspect there are many ways to improve. If you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests! - -h3. Send us your theme! - -I'm hoping to collect a bunch of themes for our command prompts. You can see existing ones in the @themes/@ directory. - -h2. Contributors - -This project wouldn't exist without all of our awesome users and contributors. - -* "View our growing list of contributors":https://github.com/robbyrussell/oh-my-zsh/contributors - -Thank you so much! diff --git a/lib/powerlinecolours b/lib/powerlinecolours new file mode 100644 index 000000000..5d1032c22 --- /dev/null +++ b/lib/powerlinecolours @@ -0,0 +1,71 @@ +# custom colour definitions for powerline theme (oh-my-zsh) +# this file should be symlinked to ~/.powerlinecolours if you +# want to make use of it. + +# get your hostname checksum with: + +# OSX: +# echo -n "$(hostname)" | shasum | cut -d" " -f 1 + +# Linux: +# echo -n "$(hostname)" | sha1sum | cut -d" " -f 1 + +# c7d8a6d722a1ec9a16fae165177c418d4fd63175 + +# use shasum on Mac OS X, sha1sum on Linux: +if [[ "$(uname)" == "Darwin" ]]; then + shasum_cmd="shasum" +else + shasum_cmd="sha1sum" +fi + +# calculate hostname sha1 +hash="$(echo -n "$(hostname)" | $shasum_cmd | cut -d" " -f 1)" + +case "$hash" in + + +# specify colour themes for different hosts here (to see the ccolour codes, use the 256-colour-test.py script): +c4c948228b9947cec128662a414e1f4194573329) +colours=(254 24 208 236) +# \ \ \ \________________> prompt background colour for root +# \ \ \__________________> prompt foreground colour for root +# \ \_____________________> prompt background colour for user +# \_______________________> prompt foreground colour for user +;; + +c7d8a6d722a1ec9a16fae165177c418d4fd63175) +colours=(250 234 196 32) +# \ \ \ \________________> prompt background colour for root +# \ \ \__________________> prompt foreground colour for root +# \ \_____________________> prompt background colour for user +# \_______________________> prompt foreground colour for user +;; + +09407639790bbb3778e1c2a9f81c0680186097d1) +colours=(254 62 196 32) +# \ \ \ \________________> prompt background colour for root +# \ \ \__________________> prompt foreground colour for root +# \ \_____________________> prompt background colour for user +# \_______________________> prompt foreground colour for user +;; + +0ccd98ec02bedc50fef38fc9f285eb14b63c89a4) +colours=(254 130 196 32) +# \ \ \ \________________> prompt background colour for root +# \ \ \__________________> prompt foreground colour for root +# \ \_____________________> prompt background colour for user +# \_______________________> prompt foreground colour for user +;; + + + + +esac + +# set colours from array: +prompt_context_user_fg="${colours[1]}" +prompt_context_user_bg="${colours[2]}" +prompt_context_root_fg="${colours[3]}" +prompt_context_root_bg="${colours[4]}" + diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh deleted file mode 100644 index ef66e23f1..000000000 --- a/oh-my-zsh.sh +++ /dev/null @@ -1,53 +0,0 @@ -# Check for updates on initial load... -if [ "$DISABLE_AUTO_UPDATE" != "true" ] -then - /usr/bin/env zsh $ZSH/tools/check_for_upgrade.sh -fi - -# Initializes Oh My Zsh - -# add a function path -fpath=($ZSH/functions $ZSH/completions $fpath) - -# Load all of the config files in ~/oh-my-zsh that end in .zsh -# TIP: Add files you don't want in git to .gitignore -for config_file ($ZSH/lib/*.zsh) source $config_file - -# Add all defined plugins to fpath -plugin=${plugin:=()} -for plugin ($plugins) fpath=($ZSH/plugins/$plugin $fpath) - -# Load and run compinit -autoload -U compinit -compinit -i - -# Load all of the plugins that were defined in ~/.zshrc -for plugin ($plugins); do - if [ -f $ZSH/custom/plugins/$plugin/$plugin.plugin.zsh ]; then - source $ZSH/custom/plugins/$plugin/$plugin.plugin.zsh - elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then - source $ZSH/plugins/$plugin/$plugin.plugin.zsh - fi -done - -# Load all of your custom configurations from custom/ -if [ -d "$ZSH/custom" ]; then - for config_file ($ZSH/custom/*.zsh) source $config_file -fi - -# Load the theme -if [ "$ZSH_THEME" = "random" ] -then - themes=($ZSH/themes/*zsh-theme) - N=${#themes[@]} - ((N=(RANDOM%N)+1)) - RANDOM_THEME=${themes[$N]} - source "$RANDOM_THEME" - echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..." -else - if [ ! "$ZSH_THEME" = "" ] - then - source "$ZSH/themes/$ZSH_THEME.zsh-theme" - fi -fi - diff --git a/themes/powerline.zsh-theme b/themes/powerline.zsh-theme index 465a0e80b..860eb7a74 100644 --- a/themes/powerline.zsh-theme +++ b/themes/powerline.zsh-theme @@ -18,7 +18,7 @@ SEGMENT_SEPARATOR='' RSEGMENT_SEPARATOR='' # use custom colours: -source "$ZSH"/powerlinecolours +source "$ZSH"/lib/powerlinecolours # Begin left side segment # Takes two arguments, background and foreground. Both can be omitted, diff --git a/zshrc b/zshrc index c3f4f2c28..cc550281e 100644 --- a/zshrc +++ b/zshrc @@ -4,7 +4,8 @@ ZSH=.zsh # export ZSH_THEME="random" -export ZSH_THEME="ezzsh" # name of zsh theme +# export ZSH_THEME="ezzsh" # name of zsh theme +export ZSH_THEME="powerline" # name of zsh theme # Set this to true to use case-sensitive completion CASE_SENSITIVE="false" # bool @@ -19,7 +20,7 @@ DISABLE_LS_COLORS="false" # bool DISABLE_AUTO_TITLE="false" # bool # Uncomment following line if you want disable red dots displayed while waiting for completion -DISABLE_COMPLETION_WAITING_DOTS="false" # bool +DISABLE_COMPLETION_WAITING_DOTS="true" # bool # plugins to load (array) # Example format: plugins=(rails git textmate ruby lighthouse) From 0166395a0ca78d2d253a3f38272d6542bdf2efda Mon Sep 17 00:00:00 2001 From: Armin Jenewein Date: Fri, 30 Jan 2015 11:07:05 +0100 Subject: [PATCH 4/4] add new host to powerlinecolours --- lib/powerlinecolours | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/powerlinecolours b/lib/powerlinecolours index 5d1032c22..a607abf3a 100644 --- a/lib/powerlinecolours +++ b/lib/powerlinecolours @@ -10,8 +10,6 @@ # Linux: # echo -n "$(hostname)" | sha1sum | cut -d" " -f 1 -# c7d8a6d722a1ec9a16fae165177c418d4fd63175 - # use shasum on Mac OS X, sha1sum on Linux: if [[ "$(uname)" == "Darwin" ]]; then shasum_cmd="shasum" @@ -35,7 +33,7 @@ colours=(254 24 208 236) ;; c7d8a6d722a1ec9a16fae165177c418d4fd63175) -colours=(250 234 196 32) +colours=(253 68 196 32) # \ \ \ \________________> prompt background colour for root # \ \ \__________________> prompt foreground colour for root # \ \_____________________> prompt background colour for user