Forked from Mathias Bynens'
Based around a Monokai theme, includes the solutions I've found thus far to my most frequent terminal-related tasks.
You can clone the repository wherever you want. (I like to keep it in ~/Projects/dotfiles
, with ~/dotfiles
as a symlink.) The bootstrapper script will pull in the latest version and copy the files to your home folder.
git clone https://github.com/mvaldesdeleon/dotfiles.git && cd dotfiles && source bootstrap.sh
To update, cd
into your local dotfiles
repository and then:
source bootstrap.sh
Alternatively, to update while avoiding the confirmation prompt:
set -- -f; source bootstrap.sh
To install these dotfiles without Git:
cd; curl -#L https://github.com/mvaldesdeleon/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,bootstrap.sh,LICENSE-MIT.txt}
To update later on, just run that command again.
If ~/.path
exists, it will be sourced along with the other files, before anything else takes place.
Here’s an example ~/.path
file that adds some directories to the $PATH
:
# Verbose but straight-forward
path_directories=(
'/Users/mvaldes/Miscellaneous/bin'
'/Users/mvaldes/Library/Android/sdk/platform-tools'
'/Users/mvaldes/Library/Android/sdk/tools'
'/opt/local/bin'
'/opt/local/sbin'
'/usr/local/bin'
'/usr/texbin'
'/usr/bin'
'/bin'
'/usr/sbin'
'/sbin'
)
export PATH=$(printf "%s:" "${path_directories[@]}")
unset path_directories
# Additional paths (e.g., Z_PATH ) are also defined here
If ~/.extras
exists, it will be sourced along with the other files. You can use this to add a few custom commands without the need to fork this entire repository, or to add commands you don’t want to commit to a public repository.
My ~/.extras
looks something like this:
# Default username and hostname for prompt customization
export DEFAULT_USERNAME='mvaldes'
export DEFAULT_HOSTNAME='Martins-MacBook-Pro'
export DEFAULT_USER="$DEFAULT_USERNAME"
# Personal data for Git setup
export FULL_NAME="Martín Valdés de León"
export HOME_EMAIL="m.valdesdeleon@home.com"
export WORK_EMAIL="m.valdesdeleon@work.com"
# Git credentials
GIT_AUTHOR_NAME="$FULL_NAME"
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
git config --global user.name "$GIT_AUTHOR_NAME"
# Disabled to allow local overrides
# GIT_AUTHOR_EMAIL='$WORK_EMAIL'
# GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
git config --global user.email "$WORK_EMAIL"
# Easier navigation: Custom/Work-related directories
# [aliases for quick cd'ing into specific directories, not included here]
# Git local user.email switcheroo
git config --global alias.work '! git config user.email "$WORK_EMAIL"'
git config --global alias.home '! git config user.email "$HOME_EMAIL"'
You could also use `~/.extras' to override settings, functions and aliases from my dotfiles repository. It’s probably better to fork this repository instead, though.
You will notice that .sharedrc:3 also initializes Z.sh. If you do not want to use this script, just remove or comment-out this line.
I've included my bash completion files as part of this repo. Should you want to use them, just copy them to somewhere appropriate and update the BASH_COMPLETION_DIR variable in .bashrc:21.
Keep in mind that these are simply the files I'm currently using, and that they might very well be out-of-date. I am not the creator/maintainer of these and I'm just providing them for completion's sake.
Update 04-2016: I switched to zsh, so I will probably not be updating these.
- Update screenshots
- Implement "New machine" files (.osx, Homebrew, Caskfile)
Suggestions/improvements welcome!
Martín Valdés de León.
Based on original work by Mathias Bynens, as well as whoever contributed on his project