Added zsh skwp.theme to installer, so we don't rely on my zsh fork anymore

This commit is contained in:
yan 2012-03-22 12:53:25 -07:00
parent 7da956b198
commit 611046e3d7
4 changed files with 39 additions and 12 deletions

View File

@ -106,14 +106,6 @@ sudo mv /usr/bin/ctags /usr/bin/ctags_original
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
```
Please note: if you want the skwp theme referenced in these dotfiles, you should
grab the skwp fork of oh-my-zsh, which just has the additional theme. While we are
waiting for @robbyrussell to merge the theme upstream (unknown if it will happen).
cd ~/.oh-my-zsh
git remote add skwp https://github.com/skwp/oh-my-zsh.git
git pull skwp master
### [fasd](https://github.com/clvv/fasd)
fasd gives you handy shell commands `f`,`a`,`s`,`d`, and `z` to jump to recently used files.

View File

@ -1,7 +1,14 @@
require 'rake'
desc "Hook our dotfiles into system-standard positions."
task :install => :submodules do
task :install => [:submodules] do
puts
puts "======================================================"
puts "Welcome to YADR Installation. I'll ask you a few"
puts "questions about which files to install. Nothing will"
puts "be overwritten without your consent."
puts "======================================================"
puts
# this has all the linkables from this directory.
linkables = []
linkables += Dir.glob('git/*') if want_to_install?('git')
@ -9,6 +16,7 @@ task :install => :submodules do
linkables += Dir.glob('ruby/*') if want_to_install?('ruby (gems)')
linkables += Dir.glob('{vim,vimrc}') if want_to_install?('vim')
linkables += Dir.glob('zsh/zshrc') if want_to_install?('zsh')
Rake::Task['zsh_themes'].invoke
skip_all = false
overwrite_all = false
@ -36,13 +44,17 @@ task :install => :submodules do
end
end
FileUtils.rm_rf(target) if overwrite || overwrite_all
`mv "$HOME/.#{file}" "$HOME/.#{file}.backup"` if backup || backup_all
run %{ mv "$HOME/.#{file}" "$HOME/.#{file}.backup"` if backup || backup_all }
end
`ln -s "#{source}" "#{target}"`
run %{ ln -s "#{source}" "#{target}" }
end
success_msg("installed")
end
task :zsh_themes do
run %{ ln -nfs #{ENV["PWD"]}/oh-my-zsh/themes/* $HOME/.oh-my-zsh/themes/ } if want_to_install?('zsh themes')
end
desc "Init and update submodules."
task :submodules do
sh('git submodule update --init')
@ -52,6 +64,11 @@ task :default => 'install'
private
def run(cmd)
puts
puts "[Installing] #{cmd}"
`#{cmd}` unless ENV['DEBUG']
end
def want_to_install? (section)
puts "Would you like to install configuration files for: #{section}? [y]es, [n]o"

View File

@ -0,0 +1,19 @@
# Simple theme with RVM prompt
function preexec() {
typeset -gi CALCTIME=1
typeset -gi CMDSTARTTIME=SECONDS
}
function precmd() {
if (( CALCTIME )) ; then
typeset -gi ETIME=SECONDS-CMDSTARTTIME
fi
typeset -gi CALCTIME=0
}
PROMPT='%{$fg[blue]%}%~%{$fg_bold[yellow]%}$(git_prompt_info)%{$reset_color%}%{$fg[blue]%}➤ %{$reset_color%}'
RPROMPT='%{$fg[blue]%}$(rvm-prompt i v p g) [${ETIME}s] %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=" "
ZSH_THEME_GIT_PROMPT_SUFFIX=" "
ZSH_THEME_GIT_PROMPT_DIRTY=" ✗"
ZSH_THEME_GIT_PROMPT_CLEAN=" ✔"

View File

@ -63,4 +63,3 @@ export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline
# Initialize fasd (https://github.com/clvv/fasd)
eval "$(fasd --init posix-alias zsh-hook)"