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
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
link_file(file)
|
link_to_dotfile file
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
system %Q{mkdir -p ~/.tmp}
|
setup_personal_folder
|
||||||
|
setup_temp_folder
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_dotfile_link
|
def create_dotfile_link
|
||||||
|
@ -41,10 +42,24 @@ end
|
||||||
|
|
||||||
def replace_file(file)
|
def replace_file(file)
|
||||||
system %Q{rm -r "$HOME/.#{file}"}
|
system %Q{rm -r "$HOME/.#{file}"}
|
||||||
link_file(file)
|
link_to_dotfile file
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_file(file)
|
def link_to_dotfile(file)
|
||||||
puts "linking ~/.#{file}"
|
link_file "$HOME/.dotfiles/#{file}", "$HOME/.#{file}"
|
||||||
system %Q{ln -s "$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
|
end
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
<key>Ansi 0 Color</key>
|
<key>Ansi 0 Color</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>Blue Component</key>
|
<key>Blue Component</key>
|
||||||
<real>0.0</real>
|
<real>0.080255681818181768</real>
|
||||||
<key>Green Component</key>
|
<key>Green Component</key>
|
||||||
<real>0.0</real>
|
<real>0.080255681818181768</real>
|
||||||
<key>Red Component</key>
|
<key>Red Component</key>
|
||||||
<real>0.0</real>
|
<real>0.080255681818181768</real>
|
||||||
</dict>
|
</dict>
|
||||||
<key>Ansi 1 Color</key>
|
<key>Ansi 1 Color</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
|
28
zsh/aliases
28
zsh/aliases
|
@ -34,17 +34,14 @@ alias cls=clear
|
||||||
alias code='cd ~/code'
|
alias code='cd ~/code'
|
||||||
alias cpr='cp -r'
|
alias cpr='cp -r'
|
||||||
alias cw='compass watch'
|
alias cw='compass watch'
|
||||||
alias d='cd ~/work/dive-networks/dive'
|
|
||||||
alias da='dartanalyzer'
|
alias da='dartanalyzer'
|
||||||
alias dc='dart --checked'
|
alias dc='dart --checked'
|
||||||
alias dd='dartdoc'
|
alias dd='dartdoc'
|
||||||
alias dot='cd ~/.'
|
|
||||||
alias dr='cd ~/Dropbox'
|
alias dr='cd ~/Dropbox'
|
||||||
alias duh='du -csh'
|
alias duh='du -csh'
|
||||||
alias functions='vim ~/.dotfiles/zsh/functions'
|
alias functions='vim ~/.dotfiles/zsh/functions'
|
||||||
alias f='fg'
|
alias f='fg'
|
||||||
alias gib='gem install bundler'
|
alias gib='gem install bundler'
|
||||||
alias gems='cd ~/dive-networks/gems'
|
|
||||||
alias history='fc -l 1'
|
alias history='fc -l 1'
|
||||||
alias histroy='history'
|
alias histroy='history'
|
||||||
alias h='heroku'
|
alias h='heroku'
|
||||||
|
@ -69,7 +66,7 @@ alias mi='mvn install'
|
||||||
alias mci='mvn clean install'
|
alias mci='mvn clean install'
|
||||||
alias mp='mvn package'
|
alias mp='mvn package'
|
||||||
alias mcp='mvn clean 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 patch='git format-patch HEAD^ --stdout > patch.diff'
|
||||||
alias reguard='killall -9 ruby ; guard'
|
alias reguard='killall -9 ruby ; guard'
|
||||||
alias r='rails'
|
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 '^[^ ]'"
|
alias gstats="echo 'Total commits: $(git rev-list HEAD --count)'; echo '\nAuthor breakdown:'; git shortlog | grep -E '^[^ ]'"
|
||||||
|
|
||||||
# Notes
|
# Notes
|
||||||
alias notes='cd ~/jelly/documents'
|
alias notes='cd ~/.personal-files/documents'
|
||||||
alias pn='vim ~/jelly/documents/Notes/stack.txt'
|
alias pn='vim ~/.personal-files/documents/Notes/stack.txt'
|
||||||
alias writing='cd ~/brain/writing'
|
alias writing='cd ~/.personal-files/brain/writing'
|
||||||
|
|
||||||
# Projects
|
# Projects
|
||||||
alias projects='cd ~/jelly/projects'
|
alias projects='cd ~/.personal-files/projects'
|
||||||
alias dot='cd ~/jelly/projects/dotfiles'
|
alias dot='cd ~/.dotfiles'
|
||||||
alias work='cd ~/work'
|
alias work='cd ~/.personal-files/work'
|
||||||
alias brain='cd ~/brain'
|
alias brain='cd ~/.personal-files/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'
|
|
||||||
|
|
||||||
# Work
|
# Work
|
||||||
source ~/work/dive-networks/aliases
|
|
||||||
alias dh='git push heroku-staging master -f'
|
alias dh='git push heroku-staging master -f'
|
||||||
|
|
||||||
|
# Other aliases
|
||||||
|
source ~/.work-aliases
|
||||||
|
|
Loading…
Reference in New Issue
Block a user