/my-mac-setup

My macOS dotfiles and setup instructions

Primary LanguageShell

My Mac Setup

MacOS Preferences

OS Changes

# Enable repeating keys by pressing and holding down keys
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false

# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false

Finder Changes

# Sort folders first in Finder
defaults write com.apple.finder _FXSortFoldersFirst -bool true

# Use current directory as default search scope in Finder
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"

# Show path bar in Finder
defaults write com.apple.finder ShowPathbar -bool true

# Quit finder using cmd-q
defaults write com.apple.finder QuitMenuItem -bool true

# Restart Finder for changes to take effect
killall Finder

System Preferences

  • Menu Bar > Uncheck "Show in Menu Bar" for Spotlight and Siri
  • Dock > Automatically hide the dock
  • Trackpad > Tap to click

CommandLine Tools for Xcode

sudo xcode-select --install

Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

iTerm2

brew install --cask iterm2
Customisation
  1. Import Dracula theme
  2. Import preferences file using these instructions

Alacritty

brew install --cask alacritty
Customisation
  1. Copy alacritty folder to ~/.config/alacritty
  2. Set alacritty icon using these instructions

zsh Setup

# Install zsh
brew install zsh

# Install Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

# Install zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

# Install zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

# Install PowerLevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

# Install some CLI programs
brew install \
	tmux \
	bat \
	exa \
	hyperfine \
	jq \
	cowsay \
	fortune \
	nvim \
	lazygit \
    zoxide \
    cloudflared

# Setup "Developer Excuses" for fortune
cd /usr/local/Cellar/fortune/9708/share/games/fortunes
rm -rf *
strfile excuses

# Paste .zshrc file

# Copy .tmux.conf to ~

Git Setup

Setup GCM

brew tap microsoft/git
brew install --cask git-credential-manager-core

Setup GPG Key for commits

brew install gnupg
gpg --import private.key
gpg --list-secret-keys --keyid-format=long
git config --global user.signingkey D58EE2143BC62EEA
git config --global commit.gpgsign true

Setup Global .gitignore

curl https://raw.githubusercontent.com/github/gitignore/master/Global/macOS.gitignore -o ~/.gitignore
git config --global core.excludesfile ~/.gitignore

Update Global Config

git config --global user.name "Anurag Roy"
git config --global user.email "anuragroy@duck.com"

Install and setup GitHub CLI

brew install gh
gh auth login
gh extension install yusukebe/gh-markdown-preview

QuickLook Plugins

brew install --cask \
    qlcolorcode \
    qlstephen \
    qlmarkdown \
    quicklook-json \
    qlprettypatch \
    quicklook-csv \
    betterzip \
    webpquicklook \
    suspicious-package

Free Apps

Dev Tools

pnpm add -g rimraf typescript tsx serve kill-port @funboxteam/optimizt

Fonts

brew tap homebrew/cask-fonts
brew install --cask font-jetbrains-mono font-inter

Download and install SF Fonts from Apple Developer

Paid Apps

  • Alfred Powerpack
  • Bartender
  • Sensei
  • iStats Menu Bar
  • Downie 4
  • Fantastical