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.
- npm.sh - install npm packages.
- 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_intel - terminal configs with aliases, paths, plugins and theme for Macs with Intel.
- .zshrc_silicon - terminal configs with aliases, paths, plugins and theme for Macs with Apple Silicon.
- starship.toml - Starship theme settings.
Note: These files are permanent.
git clone https://github.com/samuelramox/dotfiles.git && cd dotfiles
./setup.sh
Note: You can also download a specific release.
The 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, Nano, Node, PostgreSQL, Python, Ruby, Tree, Yarn, Zsh.
- Homebrew taps: homebrew/fonts, homebrew/drivers, homebrew/versions, homebrew/command-not-found.
- Homebrew casks: Google Chrome, IINA, JetBrains Mono and Visual Studio Code.
- Install Homebrew Cask Upgrade.
-
dotfiles.sh - install Oh My Zsh, some Zsh plugins, asdf, Starship theme and set .gitconfig.
-
npm.sh - install some npm packages.
-
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,