/

MacOS

macostools
On this page

macOS Tips & Tricks

Advanced macOS Command-Line Tools

There are also a good number of macOS-specific command-line utilities that provide unique macOS functionality.

  • mdfind - search with Spotlight
  • say - text-to-speech engine
  • pbcopy, pbpaste - interact with system clipboard
  • screencapture - take screenshots
  • networkQuality - measure Internet speed
  • caffeinate - set Mac sleep behavior
  • open - open files and applications
  • pmset - configure power management
  • softwareupdate - manage OS updates
  • textutil - document file converter
  • caffeinate - set Mac sleep behavior

Setup New Mac

  • restore settings by mackup: mackup restore
  • Sharing
    • Change computer name
      • sudo scutil --set ComputerName "newname"
      • sudo scutil --set LocalHostName "newname"
      • sudo scutil --set HostName "newname"

Fix not found git error

zsh
xcode-select --install

Install GUI applications (read more about these in GUI Applications)

zsh
# Install Homebrew as package manager for macOS
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
zsh
brew install --cask \
google-chrome \
firefox \
visual-studio-code \
docker \
slack \
zoom

Install terminal applications (read more about these in Terminal Applications):

zsh
brew install \
wget \
mackup \
git \
nvm \
pnpm \

Shortcuts

  • Lock: Control + Shift + Eject/Power
  • Create a new folder: Cmd + Shift + N

Log CPU and memory Usage

zsh
pip install psrecord, matplotlib
psrecord PID --plot plot.png

Finder shortcuts

  • Cmd + Shift + A – go to the Applications folder
  • Cmd + Shift + U – go to the Utilities folder
  • Cmd + Shift + D – go to the Desktop folder

Mac screenshot shortcut

  • Cmd + Shift + 3 – get an image of the full screen
  • Cmd + Shift + 4 – get just a portion of the screen
  • Cmd + Shift + 4 and then tap Space – get an image of the window

Tutorial

MacOS file management scheme

Reduce PDF File Size and Control Quality with ColorSync

  1. From “Applications > Utilities,” open the ColorSync Utility

  2. Go to the Filters tab and find the Reduce File Size option in the filters list

  3. Expand the filter by clicking the arrows on the left, so that you can see the details. The default option to “Constrain Size” is set to a max of 512 pixels, which explains why you are getting poor quality PDFs when reducing the file size in Preview. This setting is not just good enough for retaining any detail.

  1. Click on the down arrow on the right of this filter and choose Duplicate Filter. This will create a filter named Reduce File Size Copy at the bottom of the list.

  2. On the duplicated filter, select the arrow on the left to open it up and change its name and settings. To change the name, double click it. To create some different filter options, create a few with different Resolution and Quality settings.

For example, I have the following custom filters set up:

Reduce File Size (100 dpi, low quality) Reduce File Size (100 dpi, high quality) Reduce File Size (150 dpi, high quality)

  1. As soon as you create your custom filters, they will appear in the Quartz Filter dropdown of Preview’s “File > Export…” menu as well.

Tools

MonitorControl

OnlySwitch

OnlySwitch is an all-in-One menu bar app, hide MacBook Pro's notch, dark mode, AirPods, Shortcuts.

Touch Bar System Monitor

A better simple reactive system monitor on macOS for your MacBook pro. It was built with Electron.

Triangula

An iterative algorithm to generate high quality triangulated images.

SwitchHosts

SwitchHosts is an App for managing hosts file, it is based on Electron , React, UmiJS , Chakra UI, CodeMirror, etc.

Falcon- SQL editor

Falcon is a free, open-source SQL editor with inline data visualization. It currently supports connecting to RedShift, MySQL, PostgreSQL, IBM DB2, Impala, MS SQL, Oracle, SQLite and more (for connecting to Oracle, please, see here the instructions to install the required free Oracle Instant Client).

Stats-system monitor

macOS system monitor in your menu bar

AltTab

AltTab brings the power of Windows alt-tab to macOS

jitouch

jitouch is a Mac application that expands the set of multi-touch gestures for the new MacBook, the Magic Mouse, and the Magic Trackpad.

Multitouch

hat.sh-client side file encryption

Encrypt and decrypt files in your browser. Fast, Secure client-side File Encryption and Decryption using the web crypto api

Easily add more gestures to macOS

Pock-display macOS Dock in Touch Bar

Turbo Boost Switcher for Mac OS X

Turbo Boost Switcher is a little application for Mac computers that allows to enable and/or disable the Turbo Boost feature.

Pap.er-wallpaper

Elegant Wallpaper App for macOS. Deliver fresh and stunning wallpapers everyday

Diagrams.net

Diagrams.net is a free, high-quality browser-based end-user diagramming application. Diagrams.net lets you store your diagram files where you need them - on Google Drive, OneDrive, Github, GitLab, Dropbox, or on your local device. It also provides a desktop version across major platforms.

Kris-ai powered noise cancelling app

An AI-powered noise cancelling app that mutes background noise during calls

Star/Unstar selected folder

applescript
property unset : 0
property red : 2
tell application "Finder"
repeat with f in selection as alias list
set tThis to label index of f
if tThis is 0 then
if kind of f is "folder" then
set label index of folder f to red
else
set label index of file f to red
end if
else
set label index of file f to unset
end if
end repeat
end tell

Awesome macOS open source applications

Edit this page
logo
Code-related notes and snippets