Mac Setup 2022
On This Page
MacBook Pro Specification
- 13-inch
- Apple M1 Pro M1 2020
- 16 GB RAM
- 512 GB SSD
- QWERTY = English/Hebrew
- macOS Monterey (Update always)
Homebrew
Install Homebrew as package manager for macOS:
## paste in terminal and follow the instructions
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Update everything in Homebrew to recent version:
brew update
Add additional source for casks:
brew tap homebrew/cask-versions
Install GUI applications (read more about these in GUI Applications):
brew install --cask \
appcleaner \
all-in-one-messenger \
anaconda \
brewmate \
deepl \
discord \
disk-inventory-x \
docker \
figma \
google-chrome \
google-drive \
grammarly \
iterm2 \
itsycal \
macx-youtube-downloader \
mongodb-compass \
notion \
obs \
postman \
rectangle \
sublime-text \
syncthing \
telegram \
tor-browser \
transmission \
utm \
viber \
visual-studio-code \
vlc \
yandex-disk \
zoom
Install terminal applications (read more about these in Terminal Applications):
brew install \
git \
jupyterlab \
ffmpeg \
nvm
Additional GUI Applications
GUI Applications
Google Chrome
Google Chrome (web development, web browsing)
Preferences
- set default browser
- always show bookmarks
- import bookmarks from previous machine
Chrome Developer Tools
- Network -> only “Fetch/XHR”
Search Shortcuts. Add Shortucts for different search engines.
- chrome://settings/searchEngines
- Yandex, search only in Russia.
- Shortcut:
vv
- url:
https://yandex.ru/{yandex:searchPath}?text=%s&{yandex:referralID}&lr=101443&rstr=-225
- Shortcut:
- Youtube
- Shortcut:
yy
- url:
https://www.youtube.com/results?search_query=%s&page={startPage?}&utm_source=opensearch
- Shortcut:
Chrome Extensions
- ChatGPT for Search Engines - Show ChatGPT output on every search request
- DeepL Translate - AI translator
- DoubleSubs - dual subs on youtube/netflix + web translator
- Google Translate
- React Developer Tools
- Pocket - The easiest, fastest way to capture articles, videos, and more.
- Session Buddy (Manage Browser Tabs and Bookmarks)
- LanguageTool (multilingual grammar, style, and spell checker)
- RSS Feed Reader (Easy to subscribe/unsubscribe to blogs/no need email + iOS/Android)
- Inoreader (Easy to subscribe/unsubscribe to blogs/no need email + iOS/Android)
- 30 Seconds of Knowledge (random code snippet on a new tab)
- JSON Formatter
- picture-in-picture (youtube/video above other screens)
- Visual CSS Editor (Customize any website visually)
- Squish - AI-powered summary tool. Turn any body of text into a few sentences with one click.
- Zotero - Add/sync scientific PDF documents
- Video Downloader Plus
- Opus Guide (Step-by-step for instructions)
Disk Inventory X
Disk Inventory X (disk usage utility for macOS)
Docker
- used for running databases (e.g. PostgreSQL, MongoDB) in container without cluttering the Mac
- Preferences
- enable “Use Docker Compose”
Firefox
Firefox (web development)
Visual Studio Code
Visual Studio Code (web development IDE)
Settings / Synced
Sublime Text
Sublime Text (editor)
Maccy
Maccy (clipboard manager)
- enable “Launch at Login”
Rectangle
Move and resize windows in macOS using keyboard shortcuts or snap areas
OBS
OBS (for video recording and live streaming)
- for Native Mac Screen recorder
- Base (Canvas) 2880x1800 (Ratio: 16:10)
- Output 1728x1080
### Spotify
Spotify
Soundcloud
Syncthing
syncthing - Sync folders/files between devices. I use to backup all photos/video from mobile to PC
Transmission
Transmission (A torrent client that I use. Very minimal in its UI but very powerful and has all the features that I need)
UTM
UTM (Virtual machines UI using QEMU)
- download ubuntu for arm, doc
- On error with shared folder: Could not connect: Connection refused open in browser: http://127.0.0.1:9843/
- For Debian install
spice-webdavd
for shared folder. https://packages.debian.org/search?keywords=spice-webdavd, https://github.com/utmapp/UTM/issues/1204
sudo apt install spice-vdagent spice-webdavd -y
VLC
VLC (video player)
- use as default for video files
Terminal Applications
nvm
nvm (node version manager)
jupyterlab
jupyterlab (Jupyter - python development, fast code snippets)
jupyter notebook
- to start jupyter notebook
ffmpeg
ffmpeg (Converting video and audio)
compress video:
ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset slow -c:a aac -b:a 192k output.mp4 # or ffmpeg -i input.mp4 output.avi
convert video to .gif:
- ffmpeg \ -i input.mp4 \ -ss 00:00:00.000 \ -pix_fmt rgb24 \ -r 10 \ -s 960x540 \ -t 00:00:10.000 \ output.gif
NVM for Node/npm
The node version manager (NVM) is used to install and manage multiple Node versions. After you have installed it via Homebrew in a previous step, type the following commands to complete the installation:
echo "source $(brew --prefix nvm)/nvm.sh" >> ~/.zshrc
source ~/.zshrc
## or alias
## zshsource
Now install the latest LTS version on the command line:
nvm install <latest LTS version from https://nodejs.org/en/>
Afterward, check whether the installation was successful and whether the node package manager (npm) got installed along the way:
node -v && npm -v
Update npm to its latest version:
npm install -g npm@latest
And set defaults for npm:
npm set init-author-name "Roman Kurnovskii"
npm set init-author-email "you@example.com"
npm set init-author-url "https://romankurnovskii.com"
If you are a library author, log in to npm too:
npm adduser
That’s it. If you want to list all your Node.js installation, type the following:
nvm list
If you want to install a newer Node.js version, then type:
nvm install <version> --reinstall-packages-from=$(nvm current)
nvm use <version>
nvm alias default <version>
Optionally install yarn if you use it as alternative to npm:
npm install -g yarn
yarn -v
If you want to list all globally installed packages, run this command:
npm list -g --depth=0
That’s it. You have a running version of Node.js and its package manager.
OH MY ZSH
MacOS already comes with zsh as default shell. Install Oh My Zsh for an improved (plugins, themes, …) experience. Oh My Zsh is an open source, community-driven framework for managing your zsh configuration. It comes with a bunch of features out of the box and improves your terminal experience.
Install:
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Update everything (e.g. plugins) in Oh My Zsh to recent version:
omz update
Install fonts for themes:
brew tap homebrew/cask-fonts
brew install --cask font-hack-nerd-font
iTerm2
Install theme
brew install romkatv/powerlevel10k/powerlevel10k
echo "source $(brew --prefix)/opt/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
Enable suggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
echo "plugins=(zsh-autosuggestions)" >>~/.zshrc
Open new tab(CMD+T)/restart iTerm
to proceed with theme setup.
Terminal Script and Aliases
Update .zprofile
. The changes will take effect after restarting the terminal
vi ~/.zprofile
Automatic software updates
Add script to zprofile that updates everything:
- Update, upgrade all and cleanup
- softwareupdate - system software update tool
We can execute this command on startup, but i prefer handle it. When I kick of upd
command in terminal, it will update everything I need:
alias upd='brew update; brew upgrade; brew cu -a --cleanup -y -v; brew cleanup; softwareupdate -i -a; i'
Add aliases to the latest versions pip & python
# А
# ❯ which pip
# /opt/homebrew/bin/pip
# ❯ which python
# /opt/homebrew/anaconda3/bin//python
# snippet creates python virtual env in current folder
alias penv='python -m venv venv && source ./venv/bin/activate && pip install --upgrade pip && echo "\n" >> requirements.txt && pip install -r requirements.txt && pip freeze > requirements_freeze.txt && echo "venv/" >> .gitignore'
alias jp="jupyter notebook $@"
Clean space
alias clean="brew cleanup --prune=all; rm -rf ~/Library/Caches"