My OSX / Ubuntu dotfiles.
BEFORE YOU BEGIN, MAKE A FORK OF THIS REPO ON YOUR OWN GITHUB ACCOUNT I change and break things. You don't want my changes. Plus, you want to be able to make this your own! Once you've forked successfully, you can run the following two lines:
export github_user=YOUR_GITHUB_USER_NAME bash -c "$(curl -fsSL https://raw.github.com/$github_user/dotfiles/master/bin/dotfiles)" && source ~/.bashrc
Since you'll be using the [dotfiles][dotfiles] command on subsequent runs, you'll only have to export the
github_user variable for the initial install.
There's a lot of stuff that requires admin access via
sudo, so be warned that you might need to enter your password here or there.
Major Differences from cowboy/dotfiles
copy/terminals/contains a default "Solarized" themed terminal for both Terminal and iTerm. It's easier on the eyes, and works well with most CLI utilities. You can just run
open ~/terminalsto get a finder window and add from there.
init/20_ubuntu_apt.shhas some additional packages for personal taste
init/30_osx_homebrew_casks.shcontains additional casks for my personal workflow
init/40_osx_homebrew_casks_android.shis a new set of casks specifically for android development
init/40_osx_homebrew_casks_bigdata.shis a new set of casks specifically for bigdata tools
init/60_nvm.shcontains setup of nvm for node.js and io.js
init/60_osx_defaults.shsets sensible OSX defaults for the mac OS, from https://github.com/s10wen/dotfiles/blob/master/.osx
init/99_app_store_reminders.shjust yells at you to remember to check the app store (for things not in casks)
source/50_nvm.shis a manual initialization of nvm. This is to avoid having nvm modify the
source/50_commacd.shis the commacd from shyiko: https://github.com/shyiko/commacd
By default, this dotfiles installs a bash-friendly version of the Powerline prompt common in zsh. You can change this by echoing a new theme into the
.dotfiles_prompt file in the home directory. You can also add more prompts to the
echo "YOURTHEME" > $HOME/.dotfiles_prompt
powerline (default) cowboy (Ben Alman's Prompt)
About this project
First off, this is a fork of cowboy/dotfiles, and you should start there. The rest of this has to do with this specific dotfiles repo, the changes and differences, and why those changes were made.
Dear future self, you had good reasons at the time.
The easiest way to install the XCode Command Line Tools in OSX 10.9+ is to open up a terminal, type
xcode-select --installand follow the prompts.
UBUNTU USAGE you should at least update/upgrade APT with
sudo apt-get -qq update && sudo apt-get -qq dist-upgradefirst. Ben also has a ansible script if you want even more automation.
How the "dotfiles" command works
When [dotfiles][dotfiles] is run for the first time, it does a few things:
- In Ubuntu, Git is installed if necessary via APT (it's already there in OSX).
- This repo is cloned into your user directory, under
- Files in
/copyare copied into
~/. (read more)
- Files in
/linkare symlinked into
~/. (read more)
- You are prompted to choose scripts in
/initto be executed. The installer attempts to only select relevant scripts, based on the detected OS and the script filename.
- Your chosen init scripts are executed (in alphanumeric order, hence the funky names). (read more)
On subsequent runs, step 1 is skipped, step 2 just updates the already-existing repo, and step 5 remembers what you selected the last time. The other steps are the same.
/backupsdirectory gets created when necessary. Any files in
~/that would have been overwritten by files in
/linkget backed up there.
/bindirectory contains executable shell scripts (including the [dotfiles][dotfiles] script) and symlinks to executable shell scripts. This directory is added to the path.
/cachesdirectory contains cached files, used by some scripts or functions.
/confdirectory just exists. If a config file doesn't need to go in
~/, reference it from the
/sourcedirectory contains files that are sourced whenever a new shell is opened (in alphanumeric order, hence the funky names).
/testdirectory contains unit tests for especially complicated bash functions.
/vendordirectory contains third-party libraries.
The "copy" step
Any file in the
/copy subdirectory will be copied into
~/. Any file that needs to be modified with personal information (like copy/.gitconfig which contains an email address and private key) should be copied into
~/. Because the file you'll be editing is no longer in
~/.dotfiles, it's less likely to be accidentally committed into your public dotfiles repo.
The "link" step
Any file in the
/link subdirectory gets symlinked into
ln -s. Edit one or the other, and you change the file in both places. Don't link files containing sensitive data, or you might accidentally commit that data! If you're linking a directory that might contain sensitive data (like
~/.ssh) add the sensitive files to your .gitignore file!
The "init" step
Scripts in the
/init subdirectory will be executed. A whole bunch of things will be installed, but only if they aren't already.
- Minor XCode init via the init/10_osx_xcode.sh script
- Homebrew via the init/20_osx_homebrew.sh script
- Homebrew recipes via the init/30_osx_homebrew_recipes.sh script
- Homebrew casks via the init/30_osx_homebrew_casks.sh script
- Fonts via the init/50_osx_fonts.sh script
- APT packages and git-extras via the init/20_ubuntu_apt.sh script
- Node.js, npm and nave via the init/50_node.sh script
- Ruby, gems and rbenv via the init/50_ruby.sh script
- Some additional things in the init area
Copyright (c) 2014 "Cowboy" Ben Alman
Licensed under the MIT license.