dotfiles

:wrench: .files, including ~/.macos β€” sensible hacker defaults for macOS

Subscribe to updates I use dotfiles


Statistics on dotfiles

Number of watchers on Github 18563
Number of open issues 159
Average time to close an issue about 8 hours
Main language VimL
Average time to merge a PR about 21 hours
Open pull requests 84+
Closed pull requests 125+
Last commit about 1 year ago
Repo Created over 7 years ago
Repo Last Updated 9 months ago
Size 813 KB
Homepage https://mths.be/d...
Organization / Authormathiasbynens
Contributors101
Page Updated
Do you use dotfiles? Leave a review!
View open issues (159)
View dotfiles activity
View on github
Fresh, new opensource launches πŸš€πŸš€πŸš€
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating dotfiles for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Mathiass dotfiles

Screenshot of my shell prompt

Installation

Warning: If you want to give these dotfiles a try, you should first fork this repository, review the code, and remove things you dont want or need. Dont blindly use my settings unless you know what that entails. Use at your own risk!

Using Git and the bootstrap script

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/mathiasbynens/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

Git-free install

To install these dotfiles without Git:

cd; curl -#L https://github.com/mathiasbynens/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,bootstrap.sh,.osx,LICENSE-MIT.txt}

To update later on, just run that command again.

Specify the $PATH

If ~/.path exists, it will be sourced along with the other files, before any feature testing (such as detecting which version of ls is being used) takes place.

Heres an example ~/.path file that adds /usr/local/bin to the $PATH:

export PATH="/usr/local/bin:$PATH"

Add custom commands without creating a new fork

If ~/.extra 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 dont want to commit to a public repository.

My ~/.extra looks something like this:

# Git credentials
# Not in the repository, to prevent people from accidentally committing under my name
GIT_AUTHOR_NAME="Mathias Bynens"
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
git config --global user.name "$GIT_AUTHOR_NAME"
GIT_AUTHOR_EMAIL="mathias@mailinator.com"
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
git config --global user.email "$GIT_AUTHOR_EMAIL"

You could also use ~/.extra to override settings, functions and aliases from my dotfiles repository. Its probably better to fork this repository instead, though.

Sensible macOS defaults

When setting up a new Mac, you may want to set some sensible macOS defaults:

./.macos

Install Homebrew formulae

When setting up a new Mac, you may want to install some common Homebrew formulae (after installing Homebrew, of course):

./brew.sh

Some of the functionality of these dotfiles depends on formulae installed by brew.sh. If you dont plan to run brew.sh, you should look carefully through the script and manually install any particularly important ones. A good example is Bash/Git completion: the dotfiles use a special version from Homebrew.

Feedback

Suggestions/improvements welcome!

Author

twitter/mathias
Mathias Bynens

Thanks to

dotfiles open issues Ask a question     (View All Issues)
  • about 2 years Disabling Mission Control animation in Sierra?
  • over 2 years [.macos] Hide battery percentage (com.apple.menuextra.battery user defaults)
  • over 2 years Downward scrolling with trackpad in man pages not working
  • over 2 years [.macos] Add Finder sidebar (com.apple.sidebarlists) user defaults
  • over 2 years Key repeat broken in macOS Sierra
  • over 2 years add npm-debug.log to gitignore?
  • over 2 years 'afk' causes system freakout
  • over 2 years What is the ~/bin/bash symlink used for?
  • over 2 years Use Git's `include` directive?
  • over 2 years .curlrc has conflict with homebrew
  • almost 3 years Setting to disable .DS_Store creation on network drives is broken
  • almost 3 years Errors on Bash-start
  • almost 3 years Include the settings for diff-so-fancy somehow :)
  • almost 3 years Junk characters in mail
  • almost 3 years Reenable Notification Center
  • almost 3 years invisible timestamp
  • about 3 years TextEdit settings don't take effect on El Capitan
  • about 3 years npm.sh
  • about 3 years Hide Spotlight tray-icon throws `Operation not permitted` on OS X 10.11
  • about 3 years bash_prompt throw error in git-bash
  • about 3 years Undo typing in zsh as in a normal OS X text
  • over 3 years How do I change the colours?
  • over 3 years Problem with qlstephen after executing .osx
  • over 3 years git "insufficient permission" error when running jspm install
  • over 3 years Notification Center
  • over 3 years Bash-Completion Errors
  • over 3 years Consider changing curlrc user agent
  • over 3 years .extra resources ideas
  • over 3 years SystemAudioVolume not working in Yosemite
  • over 3 years Sym link?
dotfiles open pull requests (View All Pulls)
  • .gitconfig: use `diff-so-fancy` for visualising diffs
  • add npm.sh
  • add missing tools
  • Fix tap to click for El Capitan
  • Merge
  • .osx: Explicit the need for sudo in order to kill `mds` processes
  • Allow deleting to previous slash using Ctrl+b
  • Update .osx
  • added meaning finder and word pronouncer
  • Add command to enable TRIM on third-party SSDs
  • prompt_git: indicate branch changes *behind* and *after*
  • Fix bash prompt issue if newline character is removed from PS1.
  • Enabled grunt shell tab auto-completion
  • adds fixbrew alias
  • Add some networking stuff: revip() and asn()
  • Order prop. alphabetically and add Markdown config
  • Add auto detect active network interface
  • Enable both GNU and OS X `ls` commands to use Solarized colorscheme.
  • Add settings for decimals.
  • Clarify comments for python related functions
  • bootstrap.sh: List exclude patterns in a file
  • Added .jshintrc file
  • Enable vim 'brackedted mode' (see http://stackoverflow.com/a/7053522/31493)
  • .gitconfig: Open merge conflicts in default editor
  • Disable mail sounds
  • Use grc to make bash less boring
  • Add some useful QuickLook plugins to Caskfile
  • Fix error from systemsetup
  • .osx: Tighten up security.
  • Add ability to use symlink.
  • Symlink subl binary into $PATH
  • Master
  • add `o-github` function
  • .gitconfig: add `purge` alias
  • Automate switch to using brew-installed bash
  • Added battery status to PS1
  • Git alias to list aliases
  • added feh aliases
  • Exports file. Colors in man pages.
  • vim: indent stuff
  • Fixes ⌘ + Enter shortcut in Mail.app not working in El Capitan
  • Respect alternate brew installation locations
  • add experimental heuristic for diffs to .gitconfig
  • add nvm to bash_profile
  • Regroup and extend security options
  • exclude `.macos` from bootstrap.sh
  • Clean up obsolete Bash coding style in bootstrap.sh
  • update pumpitup alias
  • enable access to GNU coreutils man pages
  • Add support for negative value return to `calc()`
  • fix manpage scrolling
  • Keep System Preferences from Interfering.
  • Remove no-op --all flag in brew upgrade calls
  • Janitorial stuff
  • Include Mac AppStore CLI
  • allow mouse scrolling in man
  • .functions: Add Subresource Integrity hash generator
  • Implement $CDPATH and combine shopt options
  • Advance update alias
  • Clarify source for bash-completion
  • brew.sh:Replace brew.sh to Brewfile and install.sh
  • Disable autocomplete when pressing ESC
  • Set mouse speed.
  • Add font smoothing documentation.
  • Additional Transmission config.
  • Add config for f.lux
  • Show boot-screen language menu selector
  • Remove disabling of Sudden Motion Sensor for SSDs
  • disabling additional annoying macos automatic substitutions
  • bootstrap.sh: exclude brew.sh from being rsynced
  • Add flag for dry-run of rsync
  • Fix error in systemuiserver changes in .macos
  • Map Caps Lock to Left Control key
  • Do not rsync .macos
  • Consolidate energy management settings.
  • Sync time from network.
  • Safari: also disable Java for local domains.
  • Safari: disable location services.
  • 🎨 Updates pull alias to a more recent version of pulling submodules
  • Update .aliases
  • brew formula for wget does not have IRI option
  • .macos: Use sudo to `killall mds`
  • Add example of how to manage DNS servers
  • htop added
dotfiles questions on Stackoverflow (View All Questions)
  • Possibility of syntax highlighting β€œdotless dotfiles” on GitHub
  • How can I move all dotfiles out of ~/ $HOME directory
  • Find all dotfiles, but not . or .. regex
  • Do dotfiles have a file extension?
  • Bash function to process all dotfiles in a directory excluding directories
  • How to use recursive wildcards in fish shell for dotfiles and -folders?
  • how to reset Vim & TMUX dotfiles
  • RVM sourcing line not found for Bash, rerun this command with '--auto-dotfiles' flag to fix it
  • Bash-Completion is broken after installation of Dotfiles
  • How to use Github to manage dotfiles?
  • Using bash to automate dotfiles
  • Manage dotfiles inhibiting hardcoded paths?
  • Unison fails to backup hidden dotfiles
  • What's the recommended way to copy multiple dotfiles with yeoman?
  • Symlink and hide dotfiles
  • Git tracking dotfiles (example: .zshrc)
  • Ruby list directory with Dir['*'] including dotfiles but not . and
  • How do I manage a dotfiles repo when some directories contain git repos?
  • Git repo with files from multiple directories (dotfiles syncing)
  • Why do you need dotfiles_old when you are creating dotfiles
  • Are all .dotfiles secure from http requests, or only .htaccess/.htpasswd?
  • Can't get symlinks to work for dotfiles
  • Avoiding PATH variable conflicts when syncing dotfiles?
  • I ran a script to set up dotfiles and can't undo it
  • /bin/bash version is too low, how to use a different version of bash to source dotfiles when logging in
  • show dotfiles in textmate 2?
  • Non-destructive Git checkout in dirty work tree ($HOME/.dotfiles)
  • Where should dotfiles go in a collection of chef cookbooks?
  • Can't source bash dotfiles when running commands using the subprocess module in python
  • Installing dotfiles somewhere other than Home directory
dotfiles list of languages used
Other projects in VimL