Skip to content

My collection of .dotfiles, settings, and snippets for my M1 MBP 💻

Notifications You must be signed in to change notification settings

thecaffeinedev/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💻 dotfiles

My personal Dotfiles for my M1 MBP 💻

These are my dotfiles. Take anything you want, but at your own risk.

Table of Contents

Installation

Dotfiles are application configuration and settings files. They frequently begin with a dot, hence the name.

Rosetta 2

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.

Homebrew

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 CLI

xcode-select --install

Hardware

macOS

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

Homebrew package management

  • 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 of the apps

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

Shell

  • 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.

Text editors and Apps

VSCode

VSCode runs natively on M1.

Sublime Text

It also runs natively.

Apps

  • 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

Git

Install git by

brew install git

Setup Git config

git config --global user.name "your name"

git config --global user.email "someone@gmail.com"

I do set up SSH keys for my Github auth.

You can check my git config here.

Language-specific setup

Python

By default Python 3.9 is there. You can install Python 3.8 by

brew install python@3.8

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.

Virtualenvwrapper

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/python@3.8/bin:$PATH"
export VIRTUALENVWRAPPER_PYTHON=/opt/homebrew/bin/python3
export WORKON_HOME=$HOME/.virtualenvs
source /opt/homebrew/bin/virtualenvwrapper.sh

Javascript

Node.js

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

Key generation

To generate an SSH key:

ssh-keygen -t ed25519 -C "your_email@example.com" -f ~/.ssh/id_ed25519_"$(whoami)"

Connecting to GitHub

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 git@github.com.

To Manage multiple SSH keys. Here are some sites, which I have found to be useful

General productivity

Media

VSCode Extensions

Below is the combination of extensions that fulfills both of my purposes.

I have missed many extensions. I will update it later on.

Conclusion

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.

About

My collection of .dotfiles, settings, and snippets for my M1 MBP 💻

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages