workstation ⚙️ macOS - martindubenet/wed-dev-design GitHub Wiki
-
Safari
- ⌘Command+L : Set focus in address bar.
-
Search
- ⌘Command+Spacebar : Opens Spot light (floating window) to search on macOS.
- ⌥Option+⌘Command+Spacebar : Opens the Search field within Finder window.
-
Color picker
- ꜛSHIFT+⌘Command+C : Copy color values as text. More about Digital Color Meter native app is available on support.apple.com.
-
Text inputs
-
Toggle keyboard’s input sources languages using one of those two options:
(request to enable shortcut in Keyboard settings)- fn⬆ (when NOT within a text editor),
- If within a text editor ⮕ ⌃Ctrl+⌥Option+Spacebar
- Emoticons 🎭👉 ⌃Ctrl+⌘Command+Spacebar
-
Toggle keyboard’s input sources languages using one of those two options:
-
Toggle view
- fn⬆+F11 : Toggle from the actual view to Desktop and back.
- ⌘Command+↦Tab : Navigate through open apps.
- ⌘Command+h : Hide the active window.
-
Finder
- ⌥Option+⌘Command+Spacebar : Focus on the Search field within Finder window.
- ꜛSHIFT+⌘Command+. : Toggle system’s HIDDEN FILES visibility.
- ꜛSHIFT+⌘Command+g : Opens the « GO TO FOLDER » window.
-
⌘Command+J : Show View Options
-
Check
✅ Calculate all sizes
: Displays FOLDER SIZE in Finder’s Sizes columns -
Check
✅ Show Library folder
: Turns Library visible in the list.
-
Check
-
Notifications
- Click on the date and time to toggle the Notifications window.
- Scroll down the Notifications window and click on Edit Widgets to customize the view to your needs.
-
Screenshot on Mac
- ꜛSHIFT+⌘Command+3 : Captures the entire screen.
- ꜛSHIFT+⌘Command+4 : Captures a portion of the screen.
- ꜛSHIFT+⌘Command+4+Spacebar : Captures the active window (or menu).
- ꜛSHIFT+⌘Command+5 : Take pictures or screencast using the Screenshot app.
- ꜛSHIFT+⌘Command+6 : Captures the MacBook Pro Touch Bar.
Try Shottr free app with incorporated features like ruler, pixelate area, remote saves, etc.
By default the screenshuts are saved within ~/Documents/Screenshots/
as Screen Shot YYYY-MM-DD at HH.MM.SEC.png
. How to change where screenshots are saved on macOS
Native screen recordings (or screencasts) are saved within the (hidden by default) «User's Library» under ~/Library/ScreenRecordings/
. Keep an eye on this folder size because it gets huge very fast.
~/Movies/iMovie Library.imovielibrary/*
find . -type f -name '._*' -delete
apple.stackexchange.com: dot_clean
These hidden characters are SO useful to get when you’re stuck with a keyboard layout that those not match the active language you are typing in.
Combination | Character | Description |
---|---|---|
⌥Option+7 | ¶ |
Paragraph character |
⌥Option+8 | • |
Bullet character (unordered list icon) |
ꜛSHIFT+⌥Option+8 | ˚ |
Degree character |
ꜛSHIFT+⌥Option+= | ≠ |
NOT equal |
⌥Option+Q | œ |
French character |
ꜛSHIFT+⌥Option+Q | Œ |
Uppercase french character |
⌥Option+E | ´ |
French acute accent symbol. Do not confuse with “right single quotation mark” ( ’ )(fr: Symbole d’accent aigu) |
⌥Option+I | ˆ |
French circumflex accent |
⌥Option+[ | “ |
Left curly opening double quotes |
⌥Option+] | ‘ |
Left curly opening single quote |
⌥Option+\ | « |
Opening french citation quotation mark (fr: Guillemet d’ouverture de citation) |
ꜛSHIFT+⌥Option+\ | » |
Closing french citation quotation mark (fr: Guillemet de fermeture de citation) |
ꜛSHIFT+⌥Option+K | |
Mac OS icon |
⌥Option+G | © |
Compyrights character |
ꜛSHIFT+⌥Option+G | ˝ |
Right double quotes |
⌥Option+; | … |
Hellips |
⌥Option+/ | ÷ |
Division |
⌥Option+C | ç |
French character |
ꜛSHIFT+⌥Option+C | Ç |
Uppercase french character |
Opening bracket | Characters | Closing bracket |
---|---|---|
⌥Option+7 |
{ }
|
⌥Option+8 |
⌥Option+9 |
[ ]
|
⌥Option+0 |
⌥Option+, |
< >
|
⌥Option+. |
⌥Option+Z |
« »
|
⌥Option+X |
Combination | Character | Description |
---|---|---|
⌥Option+2 | @ |
Commercial AT sign (fr: Arobase) |
⌥Option+P | “ |
Left curly opening double quotes |
⌥Option+Ç | ~ |
Tilde |
⌥Option+; | ° |
Degree |
⌥Option+^ | ` | Escaping code, back tilde |
For more characters visit the « HTML characters cheatcheat »
When you don't have Read & Write privileges on a file you may get Permission Denied
message in the Terminal. Then simply run the “chmod 777” command line to allow access to the file.
chmod 777 example.txt
- Select one or multiple files or folders,
- ⌃Ctrl+🖱Click,
- Select « Rename » from the contextual menu.
This Terminal command will run the download speed test first and then check your upload speeds.
networkQuality -s
- Keyboard ➥ Input Sources ➥ [➕]
- « Canadian English » = Apple Magic Keyboard en-US (with touch id)
- « Canadian French - CSA » = Apple Magic Keyboard fr-CA
- « Canadian French — PC » = Logitech K800 (French Canadian Layout)
- Keyboard ➥ Input sources ➥ Edit ➥ Check
✅ Show Input menu in menu bar
.
Useful tutorial about how to open anything in VS Code using a MacOS Quick Action.
In the Mac/Linux operating systems we refer to Volumes instead of Drives as we do on Windows PC.
Terms | Windows | macOS / Linux |
---|---|---|
Hard disk | Drive | Volume |
Default disk | C:\ |
/Volumes/Macintosh HD |
How to move files or folders using the Linux
mv
command.
A « symbolic link », aka soft link or symlink, is a special kind of file that points to another file. A shell alias allows a string to be substituted for a word when it is used as the first word of a simple command.
This is useful for storing your apps files on your remote SSD drive without changing the default setup of those (Hello Adobe!) apps.
ln -s /Original Folder /Destination Folder
Example
ln -s /Volumes/YourRemoteDriveName/Projects ~/Projects
In macOS the naming convention cascade:
- Finder : «
{{💻Computer name}} / Macintosh HD / Users / {{🏠Username}}
», - Terminal : «
{{⎆Local network name}} … {{🏠Username}}$
» as prefix to every new line.
Better choose a short database safe name (PascalCase or chamelCase) for your
{{⎆Local network name}}
since it will be used for Terminal lines prefix and probably some log reports.
In Mac wording, keyboard key's language layout refers to keyboard input sources.
- System Preferences ➥ Keyboard ➥ Shortcuts : At the bottom, Check
✅ Use keyboard navigation to move focus between controls
- System Preferences ➥ Keyboard ➥ Shortcuts ➥ Input Sources :
-
Check
✅ Select the previous input source
, -
Check
✅ Select next source in Input menu
,
-
Check
- System Preferences ➥ Mouse : Check
✅ Scroll direction: Natural
. - System Preferences ➥ Trackpad ➥ Scroll & Zoom : Uncheck
⬜ Scroll direction: Natural
.
- System Preferences ➥ General ➥ Sharing ➥ Computer name :
{{💻Computer name}}
(used in Finder’s sidebar). - System Preferences ➥ General ➥ Sharing ➥ Local hostname ➥ Click [Edit] :
{{⎆Local hostname}}
. - System Preferences ➥ General ➥ Language & Region ➥ Preferred languages : (1st) English (Canada) Primary then (2nd) French (Canada) CSA.
- System Preferences ➥ Users & Groups ➥ Unlock
👆🔓
➥ Guest User : Check✅ Allow guests to log in to this computer
. - System Preferences ➥ Internet Accounts ➥ Set your iCloud, Apple Game Center, Microsoft Exchange and/or Gmail accounts.
- To display the path of the CURRENT FOLDER LOCATION within the Finder’s header, copy/paste the following command line in Terminal:
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES && killall Finder
- Finder Preferences ➥ Sidebar ➥ Show these in sidebar:
- Favorites ➥ Check
✅ Applications
- Favorites ➥ Check
✅ Downloads
- Favorites ➥ Check
✅ {{🏠Username}}
- Locations ➥ Check
✅ {{💻Computer name}}
- Locations ➥ Check
✅ Hard disks
- Locations ➥ Check
✅ External disks
- Favorites ➥ Check
- Finder Preferences ➥ Advanced:
-
Check
✅ Show all filename extensions
-
Check
- Finder ➥ View ➥ Show View Options (⌘Command+J)
- In the Info window, Check
✅ Calculate all sizes
: This will display the folder’s cumulative contents weight to display in the Finder’s Sizes columns.
- In the Info window, Check
You're gonna regroup all the three Apple medias, (iMovie) Movies, Music and Pictures libraries location on your remote USB 4 Thunderbolt compliant USB-C driver to keep precious space on your Mac's native HD exclusively for your application's files.
- First create a dedicated « Apple Media Libraries files » at the root of your remote driver where all your media libraries will be located,
- From Finder Settings's Sidebar tab, make sure that all 3 medias are checked to be visible in Sidebar,
- Drag and Drop each of the following repository file from their original location to their new common folder.
- How To Move Your iMovie Library to an External Drive
- How To Move Your Music Library to an External Drive on a Mac
- How to move Photos (and Videos) Library to External Hard Drive on Mac
Toggle the « (hover) Status Bar » : Safari App ➥ View ➥ Show/Hide Status Bar ⌘Command+/
- Make the entire URL visible within the Address Bar :
Safari Preferences ➥ Advanced ➥ Smart Search Field : Check✅ Show full website address
. - Show access tools for developing websites :
Safari Preferences ➥ Advanced : Check✅ Show Develop menu in menu bar
.
- General ➥ New window profile :
Homebrew
. - General ➥ Shells open with : Command (complete path) :
/bin/zsh
(IF you want Bash replace by/bin/bash
). - General ➥ Check
✅ Use ⌘-1 through ⌘-9 to switch tabs
.
Since macOS Catalina, Apple is now using Zsh as the default shell. Zsh is only the default shell on newly created user accounts, so any existing accounts you have on an upgraded Mac will still use Bash by default unless you change it. Each user account has its own default shell preference.
Know what shell is active :
echo $SHELL
Toggle Terminal shell from Terminal :
# Switch to Bash
chsh -s /bin/bash
# Switch to Zsh
chsh -s /bin/zsh
Code Zsh Terminal | Upgrading Bash on macOS
See this documentation on how to customize your Zsh Terminal
cd /Volumes/usbT7r/Projects/www/
Using the utility app « Audio MIDI Setup » allows us to connect multiple audio input source at once by creating a custom Aggregated Device that we then use in the app where needed.
Except for Rosetta 2 most of these instructions are for a developer's workstation.
#1 Rosetta 2
To install Rosetta 2 copy/paste the following command within the Terminal:
softwareupdate --install-rosetta
#2 Homebrew
About brew
Homebrew is a package manager for macOS. It is one of the first tools you'll need to set up a local development environment for programming on a Mac. Use it to install (and remove) software programs for the terminal, or command line. It is like an app store for programming tools (but everything is free). Learn more : « Install Homebrew » by Daniel Kehoe.
For macOS on Apple Silicon ARM64 the
$PATH
has been changed to /opt/homebrew/ and since December 1st 2021 thenow:brew cask
brew
.
- Check the following folders
ls /usr/local
ls /opt/homebrew
- If the following folders exists and contains stuff,
- If this is your case that means Homebrew is installed. Just run «
brew update
» to get the latest version.
- If this is your case that means Homebrew is installed. Just run «
- If the folders do NOT exists,
- Check your Xcode app local :
xcode-select -p
. IF the path contains «white spaces» update to the latest version or simply delete it. Because white spaces will make the Homebrew installation problematic. - Go to next step « Install Homebrew ».
- Check your Xcode app local :
If your own an Silicon ARM64 equipped workstations you should consider properly uninstallling Xcode from your computer BEFORE installing Homebrew. It seems to be the source of installation problems EVEN if the path of it’s location does not contains «white spaces».
Anyway the Homebrew installer includes the installation of missing «
Xcode Command Line Tool
(CMT)» in it’s script.
Run the following command line (as proposed on the official website: https://brew.sh)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Those 3 hidden files located under «/Users/{{username}}/
» containing specific path are required since Homebrew version 3 (December 2021).
Hidden file | Command line to create it | Should contain this |
---|---|---|
.bash_profile | echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bash_profile |
eval "$(/opt/homebrew/bin/brew shellenv)" |
.zprofile | echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile |
eval "$(/opt/homebrew/bin/brew shellenv)" |
.zshrc | echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc |
export PATH="/opt/homebrew/bin:$PATH" |
At the end these brew lines should now print something.
-
brew doctor
should print:Your system is ready to brew
-
brew list
should print the apps you installed via Homebrew, -
brew help
should print many paragraphs of info.
You can either install the full Xcode IDE available on developer.apple.com/xcode or, if you want to save space on your drive, install only the Xcode CLT.
xcode-select --install
To update to lastest version of Xcode Command Line Tools the easiest way is by first removing the old version of the tools then runing the install command line.
- Remove the existing
CommandLineTools
sudo rm -rf /Library/Developer/CommandLineTools
- Go to System Settings > Software Update. Under the Updates Available section you should see« Command Line Tools for Xcode »
Click the button « Update Now ».
- Return to the Terminal and type this command
xcode-select -p
- After receiving this message «
/Applications/Xcode.app/Contents/Developer
» [+] type this commandsudo xcode-select --switch /Library/Developer/CommandLineTools
If unsuccessful, get the .dmg
file from the download link below.
-
Java :
-
For the latest version:
brew install java
- For specific version the command «
brew install java11
» will installopenjdk@11
. - If you want you can manage multiple versions by switching Java JDK via alias from your
.zshrc
file.
-
For the latest version:
-
NodeJS :
brew install node
-
Dart Sass :
brew install sass/sass/sass
-
Git :
brew install git
-
ESLint
brew install eslint
Here is my list of « Useful workstation tools »
globals | local path |
---|---|
Homebrew | /opt/homebrew/ |
Installed via brew | /usr/local/ |
npm | /usr/local/lib/node_modules/npm/node_modules/ |
- Alfred
-
Audacity with the FFmpeg plugin (install via Terminal:
brew install ffmpeg
) - Magnet
- Paste Plain Text : Pasting clipboard copied text as plain text, available right from the top menu bar.
- PDFpen $ : (available within SetApp package).
- Skitch : A companion app for Evernote. Better then the native Preview app for screenshots. Available on iOS devices.
- Gemini $ : Find and manage file duplicatas on your station.
- Spark $ : Mail reader that includes TEAM CHATS associated with a "by email" silos.
-
Markdown note taker :
- Obsidian on both macOs and iOS devices.
-
Tot $ on iOS, Free on macOS : Cloud note taking micro-app accross all Apple devices and support Markdown
.md
format.
- iStat Menus $ : Minimalistic Mac system overview. (Or see Sensei below for a more advance app)
- Sensei $ : All in one Mac system overview that comes with the included Trim Enabler app that allow SSD disc maintenance.