Permalink
Browse files

iTerm scheme

  • Loading branch information...
0 parents commit 457832e4ecb53b5447e34e649140ef9af66ad822 @wesbos committed Mar 24, 2014
Showing with 337 additions and 0 deletions.
  1. +213 −0 cobalt2.itermcolors
  2. +124 −0 cobalt2.zsh-theme
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Ansi 0 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.0</real>
+ <key>Green Component</key>
+ <real>0.0</real>
+ <key>Red Component</key>
+ <real>0.0</real>
+ </dict>
+ <key>Ansi 1 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.0</real>
+ <key>Green Component</key>
+ <real>0.0</real>
+ <key>Red Component</key>
+ <real>1</real>
+ </dict>
+ <key>Ansi 10 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.11517760157585144</real>
+ <key>Green Component</key>
+ <real>0.81519794464111328</real>
+ <key>Red Component</key>
+ <real>0.23300750553607941</real>
+ </dict>
+ <key>Ansi 11 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.035555899143218994</real>
+ <key>Green Component</key>
+ <real>0.78536456823348999</real>
+ <key>Red Component</key>
+ <real>0.92833864688873291</real>
+ </dict>
+ <key>Ansi 12 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>1</real>
+ <key>Green Component</key>
+ <real>0.3333333432674408</real>
+ <key>Red Component</key>
+ <real>0.3333333432674408</real>
+ </dict>
+ <key>Ansi 13 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>1</real>
+ <key>Green Component</key>
+ <real>0.3333333432674408</real>
+ <key>Red Component</key>
+ <real>1</real>
+ </dict>
+ <key>Ansi 14 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.97867441177368164</real>
+ <key>Green Component</key>
+ <real>0.89121149225051699</real>
+ <key>Red Component</key>
+ <real>0.41672572861338453</real>
+ </dict>
+ <key>Ansi 15 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>1</real>
+ <key>Green Component</key>
+ <real>1</real>
+ <key>Red Component</key>
+ <real>1</real>
+ </dict>
+ <key>Ansi 2 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.13008742736566298</real>
+ <key>Green Component</key>
+ <real>0.87031603506787336</real>
+ <key>Red Component</key>
+ <real>0.21895777543895642</real>
+ </dict>
+ <key>Ansi 3 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.039139740169048309</real>
+ <key>Green Component</key>
+ <real>0.89706093072891235</real>
+ <key>Red Component</key>
+ <real>0.99814993143081665</real>
+ </dict>
+ <key>Ansi 4 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.82438474893569946</real>
+ <key>Green Component</key>
+ <real>0.37805050611495972</real>
+ <key>Red Component</key>
+ <real>0.079237513244152069</real>
+ </dict>
+ <key>Ansi 5 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.36536297202110291</real>
+ <key>Green Component</key>
+ <real>0.0</real>
+ <key>Red Component</key>
+ <real>1</real>
+ </dict>
+ <key>Ansi 6 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.73333334922790527</real>
+ <key>Green Component</key>
+ <real>0.73333334922790527</real>
+ <key>Red Component</key>
+ <real>0.0</real>
+ </dict>
+ <key>Ansi 7 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.73333334922790527</real>
+ <key>Green Component</key>
+ <real>0.73333334922790527</real>
+ <key>Red Component</key>
+ <real>0.73333334922790527</real>
+ </dict>
+ <key>Ansi 8 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.33333333333333331</real>
+ <key>Green Component</key>
+ <real>0.33333333333333331</real>
+ <key>Red Component</key>
+ <real>0.33333333333333331</real>
+ </dict>
+ <key>Ansi 9 Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.090362116694450378</real>
+ <key>Green Component</key>
+ <real>0.052976857870817184</real>
+ <key>Red Component</key>
+ <real>0.95708823204040527</real>
+ </dict>
+ <key>Background Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.21839480102062225</real>
+ <key>Green Component</key>
+ <real>0.15233974158763885</real>
+ <key>Red Component</key>
+ <real>0.073702715337276459</real>
+ </dict>
+ <key>Bold Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>1</real>
+ <key>Green Component</key>
+ <real>0.98771905899047852</real>
+ <key>Red Component</key>
+ <real>0.96919095516204834</real>
+ </dict>
+ <key>Cursor Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.03614787757396698</real>
+ <key>Green Component</key>
+ <real>0.79959547519683838</real>
+ <key>Red Component</key>
+ <real>0.94297069311141968</real>
+ </dict>
+ <key>Cursor Text Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.9480862021446228</real>
+ <key>Green Component</key>
+ <real>1</real>
+ <key>Red Component</key>
+ <real>0.99659550189971924</real>
+ </dict>
+ <key>Foreground Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>1</real>
+ <key>Green Component</key>
+ <real>1</real>
+ <key>Red Component</key>
+ <real>1</real>
+ </dict>
+ <key>Selected Text Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.70916998386383057</real>
+ <key>Green Component</key>
+ <real>0.70916998386383057</real>
+ <key>Red Component</key>
+ <real>0.70916998386383057</real>
+ </dict>
+ <key>Selection Color</key>
+ <dict>
+ <key>Blue Component</key>
+ <real>0.31055498123168945</real>
+ <key>Green Component</key>
+ <real>0.20615114271640778</real>
+ <key>Red Component</key>
+ <real>0.09597768634557724</real>
+ </dict>
+</dict>
+</plist>
@@ -0,0 +1,124 @@
+# 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://gist.github.com/1595572).
+#
+# In addition, I recommend the
+# [Solarized theme](https://github.com/altercation/solarized/) and, if you're
+# using it on Mac OS X, [iTerm 2](http://www.iterm2.com/) over Terminal.app -
+# it has significantly better color fidelity.
+#
+# # 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'
+SEGMENT_SEPARATOR=''
+
+## huh dont need this
+collapse_pwd() {
+ # echo $(pwd | sed -e "s,^$HOME,~,")
+ echo $(pwd | sed -e "s,^$HOME,~," | sed "s@\(.\)[^/]*/@\1/@g")
+}
+
+# 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%} "
+ # echo $(pwd | sed -e "s,^$HOME,~," | sed "s@\(.\)[^/]*/@\1/@g")
+ # echo $(pwd | sed -e "s,^$HOME,~,")
+ 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() {
+ local user=`whoami`
+
+ if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
+ prompt_segment black default "%(!.%{%F{yellow}%}.)✝"
+ fi
+}
+
+# Git: branch/detached head, dirty status
+prompt_git() {
+ local ref dirty
+ if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
+ ZSH_THEME_GIT_PROMPT_DIRTY='±'
+ 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
+ echo -n "${ref/refs\/heads\//⭠ }$dirty"
+ fi
+}
+
+# Dir: current working directory
+prompt_dir() {
+ prompt_segment blue black '%~'
+ # echo $(pwd | sed -e "s,^$HOME,~," | sed "s@\(.\)[^/]*/@\1/@g")
+}
+
+# Status:
+# - was there an error
+# - am I root
+# - are there background jobs?
+prompt_status() {
+ local symbols
+ 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"
+}
+
+## Main prompt
+build_prompt() {
+ RETVAL=$?
+ prompt_status
+ prompt_context
+ prompt_dir
+ prompt_git
+ prompt_end
+}
+
+PROMPT='%{%f%b%k%}$(build_prompt) '

0 comments on commit 457832e

Please sign in to comment.