Skip to content
Kamal Mahmud

My Manual Way of Setting Up MacBook Pro M1 for Software Development

I’m setting up a new Macbook Pro (16 inch, 2021 M1 Pro), and I’d like to document what I do for my own reference and hopefully will help others too. I don’t have dotfiles because so far I don’t really use a lot of aliases or custom configuration.

If you know a way to automate some of these steps, I’m looking mostly for a way to automate all the Settings part so I don’t need to rely on the UI — please let me know!

First steps

  • OhMyZsh: sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  • Homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Generate SSH key: ssh-keygen -t ed25519 -C "your_email@example.com"

Brewfile

If you don’t have one, you should do a backup of all your installed packages on your previous Mac by running the command brew bundle dump. This will generate a Brewfile which you can use to reinstall all the packages you have installed.

Here is how mine looks like:

tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-fonts"
tap "homebrew/core"
tap "homebrew/services"
brew "bat"
brew "colima"
brew "docker"
brew "docker-compose"
brew "exa"
brew "gh"
brew "jenv"
brew "jq"
brew "mas"
brew "ripgrep"
brew "teleport"
cask "devutils"
cask "disk-inventory-x"
cask "font-fira-code"
cask "imageoptim"
cask "insomnia"
cask "iterm2"
cask "jetbrains-toolbox"
cask "monodraw"
cask "mos"
cask "obsidian"
cask "raycast"
cask "rectangle"
cask "telegram-desktop"
cask "tunnelblick"
cask "visual-studio-code"
cask "vlc"
cask "whatsapp"
cask "zoom"
mas "Amphetamine", id: 937984704
mas "Hand Mirror", id: 1502839586
mas "Outline", id: 1356178125

To install, run brew bundle on the directory where the Brewfile is located.

Login to your accounts

You’ll probably use these for authenticating to other services:

  • Gmail
  • GitHub

Terminal

I really like iTerm2 for my everyday terminal. I can’t really feel the difference of speed between the default terminal and iTerm2, I just like some of its features and as a bonus, it’s not slow either.

The only other preferences I’d like to change is to show CPU, RAM, and Network usage on the status bar.

Java setup

I use SDKMAN to setup all my JDK related needs.

Install:

curl -s "https://get.sdkman.io" | bash

Then sdk install java to install the latest LTS Java version.

Docker

I’ve used Docker Desktop for a while but I’m trying the alternative, which is Colima. I’m liking it so far, and not having access to the GUI also helps me remember most used docker commands.

Steps:

brew install colima
brew install docker
brew install docker-compose
colima start
docker ps

Notes: if you followed my Brewfile then colima will already be installed and you can just run colima start to start using Docker.

Mouse

I’m using Logitech MX Master 2S right now so I’ll need Logitech Options.

Disabling mouse acceleration

I don’t like the mouse acceleration Mac has when you’re using a mouse because I’m a gamer and I’m used to not having any acceleration. Here’s how to disable it:

  1. Set tracking speed to zero on Mouse setting
  2. Set the pointer speed on Logitech Options

With this configuration, make sure you run Logitech Options on startup otherwise your mouse will be pretty slow.

I also like to enlarge my cursor size because it’s so helpful when presenting and I’ve never lost sight of my cursor ever again.

Smooth scrolling

The default scroll behavior when using mouse is janky, and using the built in smooth scroll from Logitech Options is not good enough so I turn to Mos to enable smooth scrolling.

Spotlight alternative: Raycast

Raycast is a new challenger to the well-known Alfred. I haven’t used Alfred extensively when I switched to Raycast, but so far I’m enjoying it. They have various features to help you be productive and it’s very extensible.

The Floating Notes in particular has been very helpful for writing a quick note while I’m in a meeting or saving that user info that you need to debug your application.

Settings

Touchpad

  • Enable one click
  • Disable dictionary lookup

Dock

  • Auto hide and show
  • Disable show recent items
  • Clear up everything except: Finder, System Preferences

Siri

  • Disable it

Sound

  • Disable “Play user interface sound effects”

Keyboard

  • Key repeat → Fast
  • Delay until repeat → Short

Text

  • Disable “Correct spelling automatically”
  • Disable “Capitalize words automatically”
  • Disable “Add period with double-space”
  • Disable “Use smart quotes and dashes”

Shortcuts

  • Screenshots: Copy picture of selected area as a file → Option + Shift + S (I set the screenshot button to be the same as Windows because I switch between them quite often.)
  • Keyboard: Add Keyboard shortcuts to use Command + Esc to switch between apps (I’m currently using a 65% keyboard so I don’t have the Tilde key to press easily, so I mapped it to Esc key.)

Git config

If you like to tinker around with side projects in your spare time, you will often need to commit something with your personal GitHub account. Changing the credentials when switching to a side project is tiresome, so here’s how I managed to do it:

Global git config on ~/.gitconfig:

[user]
    name = Kamal Mahmud
    email = kamalhm1997@gmail.com

[pull]
    rebase = true

[includeIf "gitdir:~/work/"]
    path = ~/work/.gitconfig

Git config on work folder ~/work:

[user]
  email = kamal.mahmud@orgs.com

Reference: https://stackoverflow.com/questions/4220416/can-i-specify-multiple-users-for-myself-in-gitconfig/43654115#43654115