Automation scripts to set up macOS for software development, privacy and general use.
When running the main script, you can select the automated setup or to update the backup. Here's a description for each option:
- Automated Setup
- Installs Homebrew.
- Restores current backup:
- Symlinks dotfiles from the repo to the home folder.
- Installs packages from a Brewfile using brew, mas and some Language Servers missing from Brew, using npm.
- Changes macOS default preferences and specific Darwin tweaks (eg: TouchID for sudo).
- Changes default user shell to Fish.
- Update Backup
- Moves dotfiles (.config/ and .zshrc) to the project directory.
- Creates symlinks back to $HOME.
- Updates Brewfile from brew packages installed.
Caution
This will overwrite your dotfiles. If you want to use this project with your own backup read this first.
Check dependencies:
git -v
Start:
git clone https://github.com/Jaycedam/mac-setup.git ~/Developer/mac-setup
bash ~/Developer/mac-setup/main.sh
Then select the option for the automatic setup.
I try to keep my config very minimal. My main tools are Alacritty, tmux, fish shell, neovim and fzf utils.
The screenshots may be out of date.
Keyboard Remaps using Karabiner Elements:
- Caps Lock to ESC on tap and to CTRL when combined whith another key. - CTRL + hjkl as arrow keys.
Some settings must be changed manually due to API limitation or lack of documentation. Check this issue for more details.
It's always recommended to make a manual backup of your dotfiles. Start by forking the project and replacing USERNAME to yours. If you have questions you can open an issue.
Important
The path ~/Developer/mac-setup is expected by the script; it's used to generate symlinks and relative path operations. If you want to use a different directory, you need to change the variable ROOT_DIR inside main.sh as well to reflect the change.
- Clone and delete my dotfiles (replace USERNAME)
git clone https://github.com/USERNAME/mac-setup.git ~/Developer/mac-setup
rm -rf ~/Developer/mac-setup/dotfiles/*
- Back up your dotfiles and Brew packages. This moves your dotfiles to the project directory, then creates symlinks to $HOME. It will also back up your Brew packages into a Brewfile (you need to have Brew installed):
bash ~/Developer/mac-setup/main.sh
Then select the option to update the backup.
Tip
If you install new Brew packages, just repeat the step 2 above to update your backup.