This is a simple and flexible dotfiles and scripts to setup macOS.
Dotfiles are configuration files on Unix-based systems. At first they are just hidden configuration files of the system (that's why the reason for starting with .). However, we can use them to make it easier to configure our computers, with many advantages:
- Easy to format a new computer
- Automation of tasks
- Easy maintenance
- Storage in remote locations (GitHub, iCloud, Dropbox, etc)
- Versioning
- Import to multiple computers
- Customize the terminal
Check linked files to more details.
- apps.sh - installs Homebrew, Homebrew Cask Upgrade and some apps.
- dock.sh - macOS Dock items customization.
- dotfiles.sh - installs Oh My Zsh, .zshrc and Git configs.
- hostname.sh - change hostname (MacBook name).
- macos.sh - macOS defaults configs.
- setup.sh - main installer.
- ssh.sh - generate SSH.
- user.sh - user data to configuration of Git and SSH.
- util.sh - support functions for other installers.
Note: These files will be discarded later.
- .gitignore_global - global gitignore.
- [.zshrc_silicon][] - terminal configs with aliases, paths, plugins and theme for Macs with Apple Silicon.
Note: These files are permanent.
git clone [email protected]:codejota/dotfiles.git && cd dotfiles
./setup.shThe setup.sh process will open user.sh for you to add your user data. This data is necessary for the configuration and functioning of Git and SSH.
# - GIT_NAME: name and surname to use in Git settings.
# - GIT_EMAIL: email to use in Git settings.
# - SSH_EMAIL: email to use in SSH settings.
# - HOSTNAME: hostname/computer name (optional, leave empty if you don't want to change).It will then install the following scripts, in this order:
-
apps.sh - install Homebrew, Homebrew Cask Upgrade and applications.
- Install Homebrew.
- Homebrew formulas: curl, Git, Node, PostgreSQL, [Python][], Ruby, Zsh.
- Homebrew taps: homebrew/fonts, homebrew/drivers, homebrew/versions, homebrew/command-not-found.
- Homebrew casks: JetBrains Mono and Visual Studio Code. and others, check file.
- Install Homebrew Cask Upgrade.
-
dotfiles.sh - install Oh My Zsh, some Zsh plugins, [Powerlike][] theme and set .gitconfig.
-
macos.sh - set custom macOS preferences.
-
dock.sh - install dockutil and set custom permanent apps in Dock. Finder and Recycle Bin are already permanent (unless you change this).
-
ssh.sh - Generate SSH.
-
hostname.sh - Update hostname (MacBook name).
-
Create a directory called Developer in Home directory for projects and development.
-
Cleanup cached downloads and remove the installation zip and folder.
Note: I suggest you read these files and turn your preferences on/off before installation.
Visual Studio Code settings are loaded by the [Settings Sync][], so you will have to change manually or load your settings.
Code → Preference → Settings (or CMD + ,) and add or edit the following values:
"editor.fontFamily": "JetBrains Mono",
"editor.fontLigatures": true,- Dotfiles Repositories
- [Awesome Dotfiles][]
- Homebrew
- Homebrew Cask Upgrade
- Dockutil
- [Sensible macOS defaults][]
- [Awesome OSX Command Line][]
- Oh My Zsh