This article is being kept up to date by me as I continue my journey.
First release : 2015 (got a macbook pro retina 15")
Last big update : June 2021 (got a M1 mac mini)
Here are a few things I had to setup, I’ll update this list as I go 🌹
Setup .zshrc
For any commands(e.g. aliases) you want to run on a new terminal session startup
cd ~/
touch .zshrc
All the alias
commands we mention below should be copy pasted to this .zshrc
file.
Fix: zsh additional settings
Improve the default prompt by adding to .zshrc
. You can use the complete prompt example, or my customised version:
PROMPT='%B%F{240}%1~%f%b %F{green}>%f '
Fix / Setup: Terminal styles
Open Terminal > Preferences > Default > Set font to font family monaco
with font-size 24
Fix / Setup: Tab between dialog buttons
You need to enable it from your keyboard options
Fix / Setup : Trackpad
- Point & Click: Tap on click
- Scroll & Zoom : Scroll Direction — Toggle off natural
Fix / Setup: Touchbar - bring back function keys
Now that you have vscode you probably want to use your function (fn) keys. They do not appear by default on the touchbar, but you can make them stick from the keyboard settings.
Fix / Setup : Setup dictation key to be Fn
The default is ctrl which is something that games use a lot (for crouching). So much prefer tapping the Fn key twice instead. Change from keyboard settings:
However there is no option to set the audio input source. You actually have to do that from “Accessibilty > Voice Control” as shown:
Fix / Setup : Don’t disconnect your wifi on locking your machine
Mac has a horrible habbit of doing this by default. Easy to fix though:
http://apple.stackexchange.com/questions/71884/wi-fi-disconnects-when-i-lock-the-mac
Fix / Setup : Finder preferences
I record my screen a lot. Showing “recent” files I’ve opened in a recording is not something I want to *ever* do. Change it in finder preferences.
Secondly I don’t want to see my external hardisks on Desktop. Desktop for me is a place to use temporarily and cleanup. I like it empty.
So the new settings after change look like:
Also in the advanced settings set performing search to current folder (default is entire mac 🤦🏻♂️):
Fix / Setup: Show hidden files
You don’t even see stuff like .editorconfig
and .gitignore
by default. To fix it just run:
defaults write com.apple.finder AppleShowAllFiles YES
You will need to restart the computer / or just finder (killall Finder
) for it to take effect.
Fix / Setup : Enable File Sharing
So I can use “files” app on my other devices (iPad) to read anything from my mac. Settings > Sharing > Enable file sharing > SMB
Note: Best to give your mac a static address for this in your router. I go with 192.168.1.123
Fix / Setup : Energy Saver
Because I use this machine as a file server as well I can’t have it go to sleep. Also putting external disks to sleep doesn’t work reliably for me (loses my sidebar favourites). So set these options as shown:
Fix / Setup : Automatically hide the dock / menu bar / show date
System Preferences > Dock and Menu Bar
Select “Dock & Menu Bar” (default) in the sidebar:
- Automatically hide and show the dock.
- Automatically hide and show the menu bar.
Click on Clock in the sidebar
- “Show Date”: “always”
- “Show Day of Week”: ✅
Mac Software I recommend (or was recommended)
- Using a file archiver: For
7z
and stuff : http://www.kekaosx.com/ - Moving and arranging windows: the free and open source rectangle app (Keyboard: recommended options)
* Most: keyboard shortcuts are ctrl + option + someArrowKey
* For Side by Side recording I use (Ctrl + Option + E — main / Ctrl + Option + G — Result)
* For Youtube Shorts I have setupCtrl + Option + P
for 1080p square recording by running the following:
defaults write com.knollsoft.Rectangle specified -dict-add keyCode -float 35 modifierFlags -float 786721
defaults write com.knollsoft.Rectangle specifiedHeight -float 1080
defaults write com.knollsoft.Rectangle specifiedWidth -float 1080
- Backup: Chronosync
Once installed open up the “BACKUP” task that I have in an external HDD. - Torrents: Transmission
- Video Player: VLC. After installing go to preferences and set
shift + right
/shift + left
forvery slow back
/very slow forward
(Allows me to scrub single handedly). - Video Converter: Handbrake
- Video Downloader: `youtube-dl` (does more than youtube)
- Git: Just run
git
on the command line. It will prompt you to install the tools. Just click the install button. Also run the following commands to add to your keychain (so you don’t have to type username/password again and again). (PS: when prompted for the password the first time, just create a new github token with “repo” access)
git config --global user.name "Basarat"
git config --global user.email "your_email@youremail.com"
git config --global credential.helper osxkeychain
- VSCode:
- Extract downloaded zip and move to Applications folder.
- Run and using command pallet (cmd + p) run “Shell command: install code in PATH”. - VSCode Extensions:
- Git Lens
- VSCode Live Share
- VSCode Eslint
- VSCode Template String Converter
- Version Lens (for updating packages)
- Rest Client - Node: Obvious reasons. I just install the latest LTS version and move on, but
n
looks promising: https://stackoverflow.com/a/19333717/390330 - Plex: Download the media server to stream series / movies to my apple tv.
- After download, extract and move to applications folder.
- Run and select “Start on login” from menu
- Login to my account
- Quit
- Restore the Server Data && library
- Start again - OBS: This is what I use to record videos for my youtube.
- Notion: What I use to manage my content creation workflow.
- Disk Speed Test: Helps me make sure that my USB hubs are working correctly.
- Zoom: Some things I change:
* Video: Check “Stop my video when joining a meeting”
* Video: Uncheck “Always show video preview dialog when joining a video meeting”
* Audio: Check “Automatically join computer audio when joining a meeting”
* Audio: Check “Mute my mic when joining a meeting”
* Share Screen : “Window size when screen sharing” : “Maintain current size”
* Keyboard Shortcuts: Mute/Unmute My Audio: “Enable Global Shortcut” (keep default shortcut :CMD + Shift + A
).
* Keyboard Shortcuts: Mute/Unmute My Video: “Enable Global Shortcut” (keep default shortcut :CMD + Shift + V
).
Tips
Tip: Toggle between windows
There are three levels
- Ctrl + Tab : tab between (e.g. chrome) tabs.
- Cmd + ` : tab between windows of same application.
- Cmd + Tab : tab between different applications
Tip: Print screen
Cmd + Shift + 5 (To capture with options)
Tip: Lock Computer / Screen
- Lock computer : Ctrl + Cmd + Q — — Then press Esc to sleep monitors
- Sleep Screen : Ctrl + Shift + Eject
Tip: Exit Application
- Cmd + Q
- Cmd + W (exit tab)
Tips: Terminal
Windows cmd becomes the mac terminal app (which is much better).
- Ctrl + c : to stop a process
- Ctrl + u: clear the current command you might have typed
- Cmd + k : clear the terminal window
Tips: Finder
Quick shortcuts
- Cmd + Shift + G : Gives you text input to paste the path you want to go to. (like explorer address bar)
- Cmd + Up : Go up a folder
- Cmd + Down: Go into folder / Open file
- Enter: Rename
- Cmd + C: Copy
- Cmd + Option + V: Move (effectively changes the original copy into a cut)
Setting sourcetree on the command line
alias sourcetree='open -a SourceTree'
Setting Simulator to be on the command line:
alias simulator='open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app'
Source : http://stackoverflow.com/a/10379712/390330
Setting IntelliJ Idea to be on the command line
alias idea='open -na "IntelliJ IDEA.app" --args "$@"'
Most common usage for me is to use diff viewer e.g. idea diff path1 path2
.
Continuous Fixes
Here I cover things that go wrong from time to time and I’ve used workarounds.
Personal Hotspot
Ability to use your iPhone as a wifi modem easily is a nice option if you are on a Mac. To ensure quick connection here is what I do:
- iPhone : switch off wifi
- iPhone: switch on the personal hot spot, it asks you to enable wifi so do it now.
- on Mac: Connect to personal hotspot by clicking on wifi in the toolbar.
Spotlight not finding applications like terminal messages etc
Ask spotlight to rebuild its index:
sudo mdutil -E /