From 8359fba73f2e0c2c9611cc81676ecd5126e4c428 Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Fri, 16 Oct 2015 00:55:34 -0400 Subject: [PATCH] Setup dotfiles in a personal-files folder --- Rakefile | 27 +++++++++++++++++++++------ iterm/iterm_mike.itermcolors | 6 +++--- zsh/aliases | 28 ++++++++++++---------------- 3 files changed, 36 insertions(+), 25 deletions(-) diff --git a/Rakefile b/Rakefile index 43ce207..5d9af8a 100644 --- a/Rakefile +++ b/Rakefile @@ -27,11 +27,12 @@ task :install do end end else - link_file(file) + link_to_dotfile file end end - system %Q{mkdir -p ~/.tmp} + setup_personal_folder + setup_temp_folder end def create_dotfile_link @@ -41,10 +42,24 @@ end def replace_file(file) system %Q{rm -r "$HOME/.#{file}"} - link_file(file) + link_to_dotfile file end -def link_file(file) - puts "linking ~/.#{file}" - system %Q{ln -s "$HOME/.dotfiles/#{file}" "$HOME/.#{file}"} +def link_to_dotfile(file) + link_file "$HOME/.dotfiles/#{file}", "$HOME/.#{file}" +end + +def link_file(source, dest) + puts "linking #{source} to #{dest}" + system %Q{ln -s #{source} #{dest}} +end + +def setup_personal_folder + puts "Where are your personal files?" + dir = $stdin.gets.chomp + link_file dir, "~/.personal-files" +end + +def setup_temp_folder + system %Q{mkdir -p ~/.tmp} end diff --git a/iterm/iterm_mike.itermcolors b/iterm/iterm_mike.itermcolors index e60e202..f89031b 100644 --- a/iterm/iterm_mike.itermcolors +++ b/iterm/iterm_mike.itermcolors @@ -5,11 +5,11 @@ Ansi 0 Color Blue Component - 0.0 + 0.080255681818181768 Green Component - 0.0 + 0.080255681818181768 Red Component - 0.0 + 0.080255681818181768 Ansi 1 Color diff --git a/zsh/aliases b/zsh/aliases index ca0b99e..c923ce9 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -34,17 +34,14 @@ alias cls=clear alias code='cd ~/code' alias cpr='cp -r' alias cw='compass watch' -alias d='cd ~/work/dive-networks/dive' alias da='dartanalyzer' alias dc='dart --checked' alias dd='dartdoc' -alias dot='cd ~/.' alias dr='cd ~/Dropbox' alias duh='du -csh' alias functions='vim ~/.dotfiles/zsh/functions' alias f='fg' alias gib='gem install bundler' -alias gems='cd ~/dive-networks/gems' alias history='fc -l 1' alias histroy='history' alias h='heroku' @@ -69,7 +66,7 @@ alias mi='mvn install' alias mci='mvn clean install' alias mp='mvn package' alias mcp='mvn clean package' -alias opensource='cd ~/jelly/open-source' +alias opensource='cd ~/.personal-files/open-source' alias patch='git format-patch HEAD^ --stdout > patch.diff' alias reguard='killall -9 ruby ; guard' alias r='rails' @@ -211,20 +208,19 @@ alias gxx='git reset --hard HEAD~1 && git pull --ff-only' alias gstats="echo 'Total commits: $(git rev-list HEAD --count)'; echo '\nAuthor breakdown:'; git shortlog | grep -E '^[^ ]'" # Notes -alias notes='cd ~/jelly/documents' -alias pn='vim ~/jelly/documents/Notes/stack.txt' -alias writing='cd ~/brain/writing' +alias notes='cd ~/.personal-files/documents' +alias pn='vim ~/.personal-files/documents/Notes/stack.txt' +alias writing='cd ~/.personal-files/brain/writing' # Projects -alias projects='cd ~/jelly/projects' -alias dot='cd ~/jelly/projects/dotfiles' -alias work='cd ~/work' -alias brain='cd ~/brain' -alias school='cd ~/brain/school' -alias pcg='cd ~/work/dive-networks' -alias dive='cd ~/work/dive-networks/dive/dive-web-app' -alias di='cd ~/work/dive-networks/dive/dive-web-app/src/cljs/dive' +alias projects='cd ~/.personal-files/projects' +alias dot='cd ~/.dotfiles' +alias work='cd ~/.personal-files/work' +alias brain='cd ~/.personal-files/brain' + # Work -source ~/work/dive-networks/aliases alias dh='git push heroku-staging master -f' + +# Other aliases +source ~/.work-aliases