Added zsh skwp.theme to installer, so we don't rely on my zsh fork anymore
This commit is contained in:
parent
7da956b198
commit
611046e3d7
@ -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
|
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](https://github.com/clvv/fasd)
|
||||||
|
|
||||||
fasd gives you handy shell commands `f`,`a`,`s`,`d`, and `z` to jump to recently used files.
|
fasd gives you handy shell commands `f`,`a`,`s`,`d`, and `z` to jump to recently used files.
|
||||||
|
23
Rakefile
23
Rakefile
@ -1,7 +1,14 @@
|
|||||||
require 'rake'
|
require 'rake'
|
||||||
|
|
||||||
desc "Hook our dotfiles into system-standard positions."
|
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.
|
# this has all the linkables from this directory.
|
||||||
linkables = []
|
linkables = []
|
||||||
linkables += Dir.glob('git/*') if want_to_install?('git')
|
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('ruby/*') if want_to_install?('ruby (gems)')
|
||||||
linkables += Dir.glob('{vim,vimrc}') if want_to_install?('vim')
|
linkables += Dir.glob('{vim,vimrc}') if want_to_install?('vim')
|
||||||
linkables += Dir.glob('zsh/zshrc') if want_to_install?('zsh')
|
linkables += Dir.glob('zsh/zshrc') if want_to_install?('zsh')
|
||||||
|
Rake::Task['zsh_themes'].invoke
|
||||||
|
|
||||||
skip_all = false
|
skip_all = false
|
||||||
overwrite_all = false
|
overwrite_all = false
|
||||||
@ -36,13 +44,17 @@ task :install => :submodules do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
FileUtils.rm_rf(target) if overwrite || overwrite_all
|
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
|
end
|
||||||
`ln -s "#{source}" "#{target}"`
|
run %{ ln -s "#{source}" "#{target}" }
|
||||||
end
|
end
|
||||||
success_msg("installed")
|
success_msg("installed")
|
||||||
end
|
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."
|
desc "Init and update submodules."
|
||||||
task :submodules do
|
task :submodules do
|
||||||
sh('git submodule update --init')
|
sh('git submodule update --init')
|
||||||
@ -52,6 +64,11 @@ task :default => 'install'
|
|||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
def run(cmd)
|
||||||
|
puts
|
||||||
|
puts "[Installing] #{cmd}"
|
||||||
|
`#{cmd}` unless ENV['DEBUG']
|
||||||
|
end
|
||||||
|
|
||||||
def want_to_install? (section)
|
def want_to_install? (section)
|
||||||
puts "Would you like to install configuration files for: #{section}? [y]es, [n]o"
|
puts "Would you like to install configuration files for: #{section}? [y]es, [n]o"
|
||||||
|
19
oh-my-zsh/themes/skwp.zsh-theme
Normal file
19
oh-my-zsh/themes/skwp.zsh-theme
Normal 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=" ✔"
|
Loading…
Reference in New Issue
Block a user