Setup dotfiles in a personal-files folder
This commit is contained in:
parent
a3c1287028
commit
8359fba73f
27
Rakefile
27
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
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
<key>Ansi 0 Color</key>
|
||||
<dict>
|
||||
<key>Blue Component</key>
|
||||
<real>0.0</real>
|
||||
<real>0.080255681818181768</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.0</real>
|
||||
<real>0.080255681818181768</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.0</real>
|
||||
<real>0.080255681818181768</real>
|
||||
</dict>
|
||||
<key>Ansi 1 Color</key>
|
||||
<dict>
|
||||
|
|
28
zsh/aliases
28
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user