My personal Dotfiles for my M1 MBP 💻
These are my dotfiles. Take anything you want, but at your own risk.
- Installation
- Hardware
- macOS
- Homebrew package management
- Shell
- Text editors and Apps
- Git
- Language-specific setup
- SSH
- General productivity
- Media
- VSCode Extension
Dotfiles are application configuration and settings files. They frequently begin with a dot, hence the name.
Rosetta 2 is the lifeline that allows us to run apps designed for Intel-based chips that use x86 architecture on ARM-based chips (in this case M1).
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
If you decide not to put the flag --agree-to-license, you will be prompted by Apple's interactive install and you will have to agree to their terms and license conditions in order to use it.
I use Homebrew to install most of my apps and utilities.
It runs natively on M1. You can install it by
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
xcode-select --install
- M1 Macbook Pro
- LG Monitor 24MK600M
- Seagate external hard drives
- Logitech Keyboard
- Logitech bluetooth mouse
Currently I am running MacOS Big Sur.
Check MacOS Updates by
sudo softwareupdate -i -a
Post-Installation, here are some of the stuff I do. You can check here
dotfiles macos
(set macOS defaults)
- Homebrew is a package manager that includes Homebrew-Cask to manage other macOS applications.
- See the Homebrew docs for further info.
To install a package (or Formula in Homebrew vocabulary) simply type:
brew install <formula>
To update Homebrew's directory of formulae, run:
brew update
To search for formulas you run:
brew search <formula>
To uninstall a formula you can run:
brew uninstall <formula>
You can find more information from Homebrew-Cask
Some useful apps and utilities are available. You can search for more and install
brew install tree wget git vim cmake rectangle grep htop
Some other apps. You can find here
dotfiles brew
(set macOS brew)
- I use Zsh as my shell, which functions like Bash but offers more customization.
- iTerm2 as my default terminal.
- I use Oh My Zsh for extra configuration.
- Also Powerlevel 10k.
VSCode runs natively on M1.
It also runs natively.
- Docker Desktop — If you’re a developer, you’ll most likely touch Docker at some point. It now runs natively on Apple Silicon Macs.
- Rectangle — I’ve tried many window management apps, and this is my favorite for its ease of use, price (free), and speed (optimized for Apple Silicon).
- Telegram
- TunnelBlick - OpenSource VPN for MacOS
- Figma
- qBittorrent
- AnyDesk
Install git by
brew install git
git config --global user.name "your name"
git config --global user.email "[email protected]"
I do set up SSH keys for my Github auth.
You can check my git config here.
dotfiles git
(set Git Config)
By default Python 3.9 is there. You can install Python 3.8 by
brew install [email protected]
I use Python 3.8 for most of my work. If you are a Data Science Enthusiast, you need to use Miniforge for now. Because most of the python libraries like Numpy, Pandas etc are not natively supported as of now.
You can download the arm version of miniforge here.
I normally use virtualenv for managing python enviroments.
You can install and setup virtualenv by
pip3 install virtualenv
And then
virtualenvwrapper
virtualenvwrapper provides a set of commands which makes working with virtual environments much more pleasant. It also places all your virtual environments in one place.
To install (make sure virtualenv is already installed):
pip3 install virtualenvwrapper
Create a directory in your home
mkdir .virtualenvs
Add path to your .bashrc
or .zshrc
export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
export VIRTUALENVWRAPPER_PYTHON=/opt/homebrew/bin/python3
export WORKON_HOME=$HOME/.virtualenvs
source /opt/homebrew/bin/virtualenvwrapper.sh
On Apple's silicon-based laptops, Node.js versions starting from 14 and below are not supported. You will have to install version 15.x.x. or greater (depending on when you are reading this).
Note that if you do not already have a profile file (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc) for your shell it won’t be able to install correctly. You should create the appropriate file(s) first before running the command below.
At first, I installed Node.js using nvm without using Homebrew. Execute the below curl command to install nvm first:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
Now that you have nvm installed you can run the following command to install node. Version 15 works on arm.
nvm install v15
You can confirm by
node --version
React and other stuff you can install later on based on your requirements.
ssh-keygen -t ed25519 -C "[email protected]" -f ~/.ssh/id_ed25519_"$(whoami)"
See the GitHub docs on connecting to GitHub with SSH.
Add SSH key to GitHub account:
- Use the GitHub CLI:
gh ssh-key add
- Or, run
pbcopy < ~/.ssh/id_ed25519_"$(whoami)".pub
, and go to GitHub in a web browser and paste the key. - Check SSH connection with
ssh -T [email protected]
.
To Manage multiple SSH keys. Here are some sites, which I have found to be useful
- https://dev.to/yashsway/setting-up-multiple-ssh-profiles-to-manage-multiple-git-accounts-macos-3m7m
- https://www.freecodecamp.org/news/how-to-manage-multiple-ssh-keys/
- https://gist.github.com/jexchan/2351996
- 1Password (Mac App Store)
- Rectangle
- Notion
- Amphetamine
- macOS Keynote, Numbers, and Pages
- Audacity
- HandBrake
- Jellyfin media server
- VLC media player
- Fotor Photo Editor
- iMovie
Below is the combination of extensions that fulfills both of my purposes.
- autoDocstring
- Auto Close tag
- Auto Complete Tag
- Auto Rename Tag
- Babel JavaScript
- Better Comments
- Bracket Pair Colorizer 2
- Code Spell Checker
- Code::Stats
- Color Highlight
- DotENV
- ESLint
- Expo Tools
- Flow Language Support
- Highlight Matching Tag
- Indent rainbow
- iOS common files
- macros
- npm
- Python
- Python Preview
- npm intellisense
- Path intellisense
- Prettier
- React Native Tools
- Read Time
- SVG Viewer
- TODO Highlight
- vscode-styled-components
- Word Count
I have missed many extensions. I will update it later on.
isapplesiliconready.com is another useful link I found sometimes back to check what is compatible to work on Apple Silicon chips natively or using Rosetta or not optimized at all.