atomantic / dotfiles

🖥️ Automated Configuration, Preferences and Software Installation for macOS
ISC License
1.33k stars 456 forks source link
configuration developer-tools dotfiles iterm2 machine macos

\[._.]/ - Hi, I'm the MacOS bot

I will update your MacOS machine with Better™ system defaults, preferences, software configuration and even auto-install some handy development tools and apps that my developer friends find helpful.

You don't need to install or configure anything upfront! This works with a brand-new machine from the factory as well as an existing machine that you've been working with for years.

Forget About Manual Configuration!

Don't you hate getting a new laptop or joining a new team and then spending a whole day setting up your system preferences and tools? Me too. That's why we automate; we did it once and we don't want to have to do it again.

\[^_^]/ - This started as Adam Eivy's MacOS shell configuration dotfiles but has grown to a multi-developer platform for machine configuration.

When I finish with your machine, you will be able to look at your command-line in full-screen mode like this (running iTerm):

iTerm Screenshot

Check out how your shell prompt includes the full path, node.js version & the working git branch along with a lot of other info! We use powerlevel9k for command prompt, so customization of what you want is easily changable in ./.zshrc The top terminal is using vim as a full replacement IDE. The bottom left two are git terminals. The bottom right is running vtop

To launch fullscreen, hit Command + Enter in iTerm, then use Command + d and Command + D to create split panes.

\[._.]/ - I'm so excited I just binaried in my pants!

Watch me run!

Running

Installation

Note: I recommend forking this repo in case you don't like anything I do and want to set your own preferences (and pull request them!)

☢️ REVIEW WHAT THIS SCRIPT DOES PRIOR TO RUNNING It's always a good idea to review arbitrary code from the internet before running it on your machine with sudo power! You are responsible for everything this script does to your machine (see LICENSE) The creator of this repo has a high tolerance for nuking his machine and starting over. If you have a low tolerance for this, proceed with caution.

git clone --recurse-submodules https://github.com/atomantic/dotfiles ~/.dotfiles
cd ~/.dotfiles;
# run this using terminal (not iTerm, lest iTerm settings get discarded on exit)
./install.sh

Note: if you have problems cloning the submodules behind proxy, you can use this command to convert git:// to https://: git config --global url.https://github.com/.insteadOf git://github.com/

Note: running install.sh is idempotent. You can run it again and again as you add new features or software to the scripts! I'll regularly add new configurations so keep an eye on this repo as it grows and optimizes.

Restoring Dotfiles

If you have existing dotfiles for configuring git, zsh, vim, etc, these will be backed-up into ~/.dotfiles_backup/$(date +"%Y.%m.%d.%H.%M.%S") and replaced with the files from this project. You can restore your original dotfiles by using ./restore.sh $RESTOREDATE where $RESTOREDATE is the date folder name you want to restore.

The restore script does not currently restore system settings--only your original dotfiles. To restore system settings, you'll need to manually undo what you don't like (so don't forget to fork, review, tweak)

3.x.x+ Upgrade Instructions!

3.0.0 brings huge changes. If you have made any modifications (and didn't make your own fork), you will want to backup your dotfiles prior to running git-up or git pull on ~/.dotfiles.

Do the following to upgrade your ~/.dotfiles safely:

  1. backup your dotfiles: cp -R ~/.dotfiles ~/.dotfiles_old
  2. cd ~/.dotfiles
  3. update dotfiles: git up or git pull
  4. remove old submodule location: rm -rf .vim (now lives in homedir/.vim)
  5. inspect install.sh and config.js to make sure all the software you want is installed
  6. inspect homedir/* for any changes you want to port from ./dotfiles_old
  7. run install.sh again

Additional

VIM as IDE

I am moving away from using Atom and instead using vim as my IDE. I use Vundle to manage vim plugins (instead of pathogen). Vundle is better in many ways and is compatible with pathogen plugins. Additionally, vundle will manage and install its own plugins so we don't have to use git submodules for all of them.

Crontab

You can cron ~/.crontab if you want to add my nightly cron software updates.

\[0_0]/ - Note that this may wake you in the morning to compatibility issues so use only if you like being on the edge

Remap Caps-Lock

Settings

This project changes a number of settings and configures software on MacOS. Here is the current list:

Prompt Driven Configuration

The following will only happen if you agree on the prompt

Security

General System Changes

Trackpad, mouse, keyboard, Bluetooth accessories, and input

Configuring the Screen

Finder Configs

Dock & Dashboard

Configuring Hot Corners

Configuring Safari & WebKit

Configuring Mail

Spotlight

iTerm2

Time Machine

Activity Monitor

Address Book, Dashboard, iCal, TextEdit, and Disk Utility

Mac App Store

Messages

SizeUp.app

Software Installation

homebrew, fontconfig, git, nvm (node + npm), and zsh (latest) are all installed inside the install.sh as foundational software for running this project. Additional software is configured in config.js and can be customized in your own fork/branch (you can change everything in your own fork/brance). The following is the software that I have set as default:

Utilities

Apps

NPM Global Modules

License

This project is licensed under ISC. Please fork, contribute and share.

Contributions

Contributions are always welcome in the form of pull requests with explanatory comments.

Please refer to the Contributor Covenant

Loathing, Mehs and Praise

  1. Loathing should be directed into pull requests that make it better. woot.
  2. Bugs with the setup should be put as GitHub issues.
  3. Mehs should be > /dev/null
  4. Praise should be directed to @antic

Author

More here: https://adameivy.com

¯\(ツ)/¯ Warning / Liability

Warning: The creator of this repo is not responsible if your machine ends up in a state you are not happy with. If you are concerned, look at the code to review everything this will do to your machine :)