Mac
Awesome Mac
Apps
Preview
Improved marking
⌥ option + held left click will only mark text inside of the spanned rectangle.
Change scroll mode
- ⌘ command + 1 sets scroll mode to continuous
- ⌘ command + 2 sets scroll mode to one page
- ⌘ command + 3 sets scroll mode to two page
Open in Terminal/Editor: Reset set terminal/editor set using OpenIn{Terminal, Editor}
defaults remove wang.jianing.app.OpenInTerminal-Lite LiteDefaultTerminal
defaults remove wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor
Fix broken "open with" database
Use when apps do not appear as an "open with" option or the wrong app opens the file.
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -v -all u,s,l
For more information and options see lsregister: a valuable undocumented command for LaunchServices by The Eclectic Light Company and the lsregister man page.
Customizing the Dock
with the default size being 64.
The Dock size can also be made immutable to cursor input:
Volume
⌥ option + shift + 🔈 / 🔊 to decrease/increase the volume by smaller increments.
General Tips and Tricks
The following three sections have been created with the following script.
curl -s <url> | pandoc -f html -t commonmark -o <output_file> && \
title=$(curl -s <url> | grep -ipo '(?<=<title>)(.*)(?=</title>)') && \
sed -i '1d' <output_file> && \
sed -i "1s/^/## ${title}\n\n/" <output_file> && \
sed -i -E 's/^#### /### /g' <output_file>
Advanced macOS Command-Line Tools
macOS is fortunate to have access to the huge arsenal of standard Unix tools.
There are also a good number of macOS-specific command-line utilities that provide unique macOS functionality.
To view the full documentation for any of these commands, run man <command>.
caffeinate - set Mac sleep behavior
Running caffeinate with no flags or arguments prevents your Mac from going to sleep as long as the command continues to run.
caffeinate -u -t <seconds> prevents sleep for the specified number of seconds.
Adding the -d flag also prevents the display from going to sleep.
Specifying an existing process with -w <pid> automatically exits the caffeinate command once the specified process exits.
Passing a command with caffeinate <command> starts the given command in a new process and will prevent sleep until that process exits.
textutil - document file converter
textutil can convert files to and from Microsoft Word, plain text, rich text, and HTML formats.
textutil -convert html journal.doc converts journal.doc into journal.html.
The possible values for -convert are: txt, html, rtf, rtfd, doc, docx.
mdfind - search with Spotlight
mdfind <query> performs a keyword-based Spotlight search with the given query.
mdfind kMDItemAppStoreHasReceipt=1 finds all apps installed from the Mac App Store.
mdfind -name <name> searches for all files matching the given name.
The -onlyin <dir> flag restricts the search to the given directory.
networkQuality - measure Internet speed
Run networkQuality to run an Internet speed test from your Mac.
Add the -v flag to view more detailed information.
Use the -i flag to run the network test on a specific network
interface.
screencapture - take screenshots
screencapture -c takes a screenshot and copies it to the clipboard.
screencapture <file> takes a screenshot and saves it to the given
file.
Add the -T <seconds> flag to take the screenshot after the given delay
in seconds.
pbcopy, pbpaste - interact with system clipboard
<command> | pbcopy copies the output of the command to the clipboard.
pbpaste outputs the contents of the clipboard to stdout.
taskpolicy - control scheduling of processes
taskpolicy -b <command> starts executing the given command in the
background. On Apple silicon Macs, the process will only run on the
efficiency cores.
taskpolicy -b -p <pid> downgrades an existing process to run in the
background.
taskpolicy -B -p <pid> removes the specified process from running in
the background. On Apple silicon Macs, the process may now run on the
efficiency or performance cores. Note that this only works on processes
that have been downgraded to the background, and not processes that
started in the background.
taskpolicy -s <command> starts the given command in the suspended
state. This is useful to allow a debugger to attach to the process right
at the start of execution.
say - text-to-speech engine
say <message> announces the given message.
say -f input.txt -o output.aiff will create an audiobook from the
given text file.
sips - image manipulation
sips -z <height> <width> <image> resizes the specified image, ignoring
the previous aspect ratio.
sips -Z <size> <image> resizes the largest side of the specified
image, preserving the aspect ratio.
sips -r <degrees> <image> rotate the image by the specified degrees.
open - open files and applications
open -a <app> <file> opens the given file with the specified
application.
open . opens the current directory in a new Finder window.
pmset - configure power management
pmset -g prints all available power configuration information.
pmset -g assertions displays information about power-related
assertions made by other processes. This can be useful for finding a
process that is preventing your Mac from going to sleep.
pmset -g thermlog displays information about any processes that have
been throttled (useful when running benchmarks).
pmset displaysleepnow immediately puts the display to sleep without
putting the rest of the system to sleep.
pmset sleepnow immediately puts the entire system to sleep.
networksetup - configure network settings
networksetup -listnetworkserviceorder prints a list of available
network services.
networksetup -getinfo <networkservice> prints information about the
specified network service.
networksetup -getdnsservers <networkservice> prints the DNS servers
for the specified network service.
networksetup -setairportnetwork <device> <network> [password] joins
the specified Wi-Fi network. (In most cases, the \<device> argument
should be "en0".)
qlmanage - manage Quick Look
qlmanage -p <file> opens a Quick Look preview window of the given
file.
qlmanage -m prints status information about the Quick Look server
process.
qlmanage -r restarts the Quick Look server process.
qlmanage -r cache resets the Quick Look thumbnail cache.
softwareupdate - manage OS updates
softwareupdate --list prints out available software updates.
sudo softwareupdate -ia installs all available updates.
softwareupdate --fetch-full-installer --full-installer-version <version>
tries to download the full installer of the specified macOS version to
/Applications.
macOS Tips & Tricks
Last updated for macOS Ventura
General
Native UI Conventions
- Press ⇧⌘/ to search all of the current app's menu items. Then use the
Up/Down arrow keys to navigate the results and press Return to
execute that menu bar action.
- Press ⌃F2 to move keyboard focus to the application's menu bar. Start
typing the first few letters of a menu title to jump to that menu.
- Hold the
Optionkey while expanding an outline view to recursively
expand all children. (The easiest place to test this is in Finder's
List view.)
- On modal dialogs/sheets, press
Command+ the first letter of the
button to press that button. ⌘. is the shortcut equivalent of the
Escape key.
- Hold
ControlandOptionwhile clicking on a window to switch focus
to that window without raising it.
- Hold
Commandwhile dragging a toolbar icon to move it to a new
position.
- By default, clicking inside a scroll bar will scroll partially towards
the clicked location. Hold Option while clicking in the scroll bar
to jump directly to the clicked location.
-
Hold
Optionwhile dragging the scroller to slowly scroll. -
In a scroll view, use the Up/Down keys to scroll in small increments.
Hold Option to scroll in larger increments, and hold Command to
scroll to the beginning or end.
- Hold
Optionwhile pressing the Page Up/Page Down keys to also move
the cursor while scrolling.
- In a text field that treats the Tab key as an input, press
Control-Tab and Control-Shift-Tab to move focus to the previous or
next control.
- Press ⌃⌘D while holding the pointer over a word to view an inline
dictionary definition of the word.
-
Press ⌃F6 to move focus to a floating window.
-
To quickly find text, select some text and press ⌘E followed by ⌘G.
-
Press ⌃⌫ to delete only the accent mark from the previous character
(e.g. é will become e).
- In Fonts windows, enter
*Xto scale the current font size, e.g.
*1.5.
- When entering text, press ⌥⇧K (on U.S. keyboards) to insert an Apple
logo.
- Hold
Commandwhile dragging a Picture-in-Picture (PiP) video player
to move it anywhere without having it snap to one of the screen
corners.
Screenshots
- After pressing ⇧⌘4 and while drawing the screen capture area, hold
Option while resizing to resize from the center, and hold Shift
while resizing to adjust only one axis. After drawing the area, hold
the Space bar and drag to move the selected area.
- After pressing ⇧⌘4, hold
Controlwhile taking the screenshot to copy
to the clipboard instead of saving to file.
- After pressing ⇧⌘4, press the Space bar to select a window to
screenshot. Hold down Option while taking the screenshot to remove
the window's shadow.
- Right click on the floating screenshot preview to access additional
actions.
Open/Save Dialogs
- Drag a file or folder from Finder into an open/save dialog to jump
directly to that file.
- In save dialogs, press ⌘= to switch between the compact and expanded
layout.
- In save dialogs, press ⌘⌫ to activate the Delete button, ⌘D to
activate the Don't Save button, and ⌘. (or Esc) to activate the
Cancel button.
- Press
~to open a Go To File dialog prefilled with the home
directory. Press / to open it prefilled with the root directory.
- Press ⌘R to reveal the selected item in Finder.
Mission Control / Window Management
- When a window is inactive, use the
Commandkey to interact with it
without making it active.
- Hold
Controlwhen pressing the Mission Control function key to only
show the current app's windows.
Hold Command when pressing the Mission Control function key to show
the desktop.
- Hold
Optionwhile double-clicking a window's corner to expand the
window to fill the screen.
Option-Click to switch windows while hiding the previous app.
Command-Option-Click to switch windows and hide all other apps.
- In the Command-Tab app switcher, press the Up or Down arrow keys (or
the 1 key) on an app to view that app's windows.
- In the Command-Tab app switcher, hold
Optionwhile switching to an
app to un-minimize all its windows.
-
Press ⌘` to cycle between windows of the foreground application.
-
Press ⌃F4 to cycle between windows across all applications in the
current desktop space.
- Drag a window to the top of the screen and push it against the top of
the screen to enter Mission Control with that window selected.
- Press ⌥⌘W or hold
Optionwhile clicking the red close button, to
close all of the foreground application's open windows.
- Press ⌥⌘M, or hold
Optionwhile clicking the yellow minimize button,
to minimize all of the foreground application's open windows.
- Hold
Optionwhile clicking the green zoom button to fill the window
to the screen instead of entering full-screen mode.
- When configuring Hot Corners in System Settings, hold any or all of
Control, Option, Command, or Shift to only activate the corner
while the selected keys are also held down.
- On a trackpad, use two fingers to double-tap (tap, not click) on an
app's Dock icon to show all of the app's windows. Alternatively,
perform the App Exposé trackpad gesture over an app's Dock icon.
- Hold
Optionwhile resizing a window to resize from the center of the
window.
Hold Shift while resizing a window to lock the aspect ratio.
- Double-click a window's border to resize that edge to fill the screen.
Hold Option while double-clicking to expand both edges.
- In Mission Control, perform a scroll up over a group of app windows to
reveal the individual windows. Press the Space bar while holding the
pointer over any window to magnify it.
- In Mission Control, Option-click another desktop space to switch to
that space while staying in Mission Control.
- In Mission Control, drag the application icon underneath the windows
to move all of an app's windows to another space.
- In Mission Control app window mode, press
TabandShift-Tabto
switch applications.
- If a window was minimized in a different space, hold
Commandwhile
un-minimizing to restore it to the current space.
- Hold
Optionwhile un-minimizing a window to un-minimize all windows
from that app.
- If an app has windows in multiple spaces, click the app's Dock icon
repeatedly to cycle through the spaces with that app's windows.
- If keyboard shortcuts are enabled for switching desktop spaces,
pressing a shortcut while clicking and holding a window will move the
window to that space.
- In Stage Manager, hold
Shiftwhile clicking on a window to add that
window to the current stage instead of replacing it.
Function Keys
- Hold down
ShiftandOptionwhen changing the volume or brightness
to make smaller adjustments.
- Hold down
Optionwhile changing the brightness to quickly open
Display settings, or while changing the volume to open Sound settings.
- Hold down
Shiftwhile changing the volume to audibly preview the
volume level.
- When connected to an external display, hold down
Controlwhile
changing the brightness to adjust the brightness of the non-active
display.
- Press and hold down on the Mission Control function key to
automatically exit Mission Control after letting go of the key.
Menu Bar / Notification Center
- Hold
Optionwhile opening the Wi-Fi and Bluetooth menus to access
extra options.
- Hold
Commandwhile dragging a menu bar icon to move it to a new
position.
- Add new menu bar items by dragging icons from Control Center to the
menu bar.
-
Option-click the date/time in the menu bar to toggle Do Not Disturb.
-
Right-click a widget to change its size.
-
On a trackpad, swipe horizontally with two fingers over a notification
to dismiss that notification.
Finder
- After copying a file, press ⌥⌘V to move the file instead of pasting a
copy of it.
- Press ⌃⌘N with multiple files selected to create a new folder with
those items.
- Press
TabandShift-Tabto navigate through files alphabetically,
regardless of the current sort ordering (only in Icons and List view).
- Hold
Optionwhile activating Quick Look to immediately launch into
full-screen view.
- After opening Quick Look with multiple files selected, press ⌘⏎ to
display a grid view of all items. Use the arrow keys to navigate and
press Return to select an item to focus on.
- Right-click on the "Open with" button to select a different app to use
to open the file.
- In Columns view, hold
Optionwhile resizing a column to
simultaneously resize all columns.
- In Columns view, double-click a column separator to auto-resize that
column. Hold Option while double-clicking on any separator to
auto-resize all columns.
- In Columns view, click the empty space at the bottom of a folder to go
to the parent folder.
- In Columns view, and when in a deeply nested file, press
Shift-Tab
and Tab to navigate through the parent directories without losing
the path to the file.
- Hold
Optionwhile dragging a file to make a new copy instead of
moving the original. Hold Command and Option to create an alias to
the file.
-
In List view, press ⌘+ and ⌘- to increase and decrease the row size.
-
In List view, press ⌥↑ and ⌥↓ to select the top-most and bottom-most
item.
- In List view, use the Left and Right arrow keys to collapse and expand
directories. When a file is selected, press the Left arrow key to jump
to the parent folder.
- Press ⌘I to show the inspector for the current file.
Press ⌥⌘I to show a floating inspector that updates with the selected
file.
-
Press ⌥⌘C to copy the full pathname of the currently selected file.
-
Press ⇧⌘. to toggle showing hidden files.
-
Press ⌥⌘⌫ to immediately delete a file without sending it to the
Trash.
- Merge folders by holding
Optionwhile dragging one folder on top of
another folder.
- Set a custom icon for a folder by copying the new icon, inspecting the
folder (⌘I), and pasting the icon by selecting the folder icon in the
upper-left of the inspector window and pressing ⌘V.
- Drag selected text into a Finder window to quickly create and save a
text clipping. (Text clippings are text files that can't be edited and
don't require a filename to be saved.)
- Press ⌥⌘O to open the selected file and automatically close the
Finder window.
- Press ⌥⇧⌘V to paste an item while preserving the file permission
flags.
- Hold
Commandwhile dragging an icon in Icon view to align it to a
grid.
- Restart Finder by holding
Optionwhile right-clicking the Finder
dock icon and selecting Relaunch.
- Drag a folder to the new tab button (only visible if multiple tabs are
already open) to open the folder in a new tab.
-
Press ⌃⌘↑ to open the parent folder in a new window.
-
If the toolbar is hidden (⌥⌘T), Finder will open folders in a new
window.
Dock
-
Press ⌥⌘D to hide and show the dock.
-
Press ⌃F3 to move keyboard focus to the Dock. Then use the Left and
Right arrow keys to select an app, or type the first few letters of an
app. Press Enter to open the selected app, or press the Up arrow key
to open the app's menu.
- Hold
ControlandShiftwhile mousing over the Dock to temporarily
turn on magnification.
- Quickly move the Dock to a different side of the screen by holding
Shift while dragging the resize handle.
- Hold
Optionwhile resizing the Dock to resize in multiples of 16
points.
- Hold
OptionandCommandwhile clicking a running app's Dock icon
to hide all other applications.
- Open a file in a specific application by dragging the file to the
application's Dock icon. If the application doesn't accept the file
type by default, force open the file by holding Option and Command
while dragging the file.
- If a dock icon is bouncing repeatedly, stop the bouncing by mousing
over the icon.
- Hold
ControlandCommandwhen right-clicking a Dock icon to only
see the default system menu options.
- Hold
OptionandCommandwhen clicking on a folder in the Dock to
open the folder in a new Finder window.
- To open multiple items from a stack, hold
Optionwhile selecting an
item to open it in the background while keeping the stack open.
- After opening a stack, hover the cursor over an item and press the
Space bar to preview the item with quick look.
- Right-click the Launchpad dock icon to open an app from an inline
menu.
- In Launchpad, hold
Optionto enter "jiggle mode" to re-arrange and
delete apps.
- Add shortcuts to System Settings to the Dock by navigating to
/System/Library/PreferencePanes and dragging preference panes to the
Dock.
- To add AirDrop to the Dock, navigate to
/System/Library/CoreServices/Finder.app/Contents/Applications in
Finder and drag the AirDrop icon to the Dock.
Spotlight
-
Press ⌘B to search the web for the current query.
-
Press ⌘C to copy the full path to the selected file, or to copy the
result of the current calculation.
-
Press ⌘D to show a dictionary preview for the current query.
-
Press ⌘L to jump to the dictionary section in the results (if
present).
-
Press ⌘⏎ or ⌘R to reveal the selected file in Finder.
-
Use the
name:filter to only search in the filename. -
Add
kind:folderto only search for folder names. -
Hold
Commandto show the path to the currently selected file.
Safari
-
To fully reload a tab, i.e., bypass the cache, press ⌥ + ⌘ + R
-
Tab groups organize tabs spatially. Use ⌥ + ⌘ + {↑, ↓, ←, →} to navigate tabs
in 2D space.
- When a video is playing, right click the speaker icon in the address
bar or tab to enter Picture-in-Picture (PiP) mode.
- Hold
Optionwhile closing a tab to close all other tabs except the
current tab.
- Click and hold the back button to see recent browsing history. Hold
Option to see page URLs instead of page titles.
- Drag selected text onto the Safari dock icon to quickly search the web
for that text.
-
Press ⇧⌘T to re-open the most recently closed tab or window.
-
Click and hold on the new tab icon in the toolbar to view recently
closed tabs.
- Press the Space bar at the beginning of the address bar to change the
search engine and to see recent web searches.
- Add
kind:bookmarkto Spotlight searches to search Safari bookmarks
and browsing history.
-
Shift-click a link to add it to Reading List. -
Click and hold a bookmark in the bookmarks bar to edit its display
title.
- Option-click the reload icon or press ⌥⌘R to force a fresh reload of
the current webpage.
- Right-click the reader icon in the address bar to automatically turn
on Reader Mode for all pages on the current website.
- After performing a web search and opening a result in the same tab,
press ⌥⌘S to go back to the search results page.
- Press ⇧⌘I to create a new email message with the contents of the
current page.
- Hold
Optionover the History > Clear History menu item to only
clear browsing history while preserving website data.
Command-click multiple mailboxes in the left sidebar to
simultaneously view all messages from the selected mailboxes.
- Select part of a message's text before replying or forwarding to only
include the selected text in the new message.
- Select an attachment in a message before forwarding to only include
the attachment in the forwarded message.
- Drag a file to the Mail dock icon to compose a new message with the
file already attached.
-
Press ⌥⇧⌘N to create a new tab.
-
Press the Space bar at the end of a message to go to the next message.
Hold Shift while pressing the Space bar at the top of a message to
go to the previous message.
- Start typing the first few characters of the sender, subject, or body
to jump to that message in the messages list.
- Press ⌥⌘↑ and ⌥⌘↓ to jump to the top-most or bottom-most message in
the messages list.
- Save an extra copy of an important message by dragging it to the
Finder.
- If a message bounces, use
Message > Send Againon the bounced
message to re-send it to a different address.
- To add a message to multiple folders, hold Command while dragging the
message to each folder.
-
Press ⇧⌘C to assign a color to a message.
-
Drag a message into the Notes or Reminders app to add a link to the
message.
- Press ⌘R and ⇧⌘R while replying to a message to switch between reply
and reply-all.
- Press ⌥⌫ to delete a message without automatically opening the next
message.
-
Command-click on the currently selected message to unselect it. -
If a message has already been replied to, click on the reply icon in
the message list to open the reply in a new window.
- When creating a new mailbox, add a forward slash to create a nested
mailbox.
- After performing a search, select a mailbox from the left sidebar to
filter the search to that mailbox.
- Hold
Shiftwhile launching Mail to reset the index.
Preview
- Press ` to bring up a magnifier, and then press
+and-to resize
it.
- In a PDF document, re-order the pages in the document by re-ordering
the pages in the sidebar.
- Merge two PDF documents by dragging pages from one document's sidebar
to the other document's sidebar.
- In the save dialog for an image, hold
Optionwhile opening the
Format menu to access an extended list of formats.
-
Hold
Optionand the Space bar to activate the pan tool. -
Hold
Optionwhile in text selection mode to switch to rectangular
text selection.
Calendar
- Hold
Shiftwhile dragging an event to set a more precise time
instead of snapping to 15-minute intervals.
- Click and hold the
Acceptbutton in a calendar invite to change
which calendar the event is accepted to.
- Hold
Optionwhile pressing theAcceptbutton in a calendar invite
to accept all events.
- Hold
Commandwhile clicking any calendar's checkbox in the left
sidebar to show or hide all calendars.
- Hold
CommandandOptionwhile clicking a calendar's checkbox to
only show that calendar.
-
Add
kind:eventto Spotlight searches to search calendar events. -
Resize the mini-calendar in the bottom-left to preview more months.
-
With an event selected, press ⌃⌥↑ and ⌃⌥↓ to adjust the time of the
event. This also works with multiple events selected.
- In Week view, press ⌥⌘← and ⌥⌘→ to shift the view by a single day.
Messages
- Press ⌘R to directly reply to the latest message in the
conversation.
Press ⇧⌘R to reply to the latest thread in the conversation.
- Press ⌘T to bring up the tapback selector for the latest message. Use
the 1-6 number keys to select a reaction.
-
Press ⌘E to edit the latest sent message.
-
Press ⌥↑ and ⌥↓ in the message input field to cycle through previously
sent messages.
-
Press ⌘1-9 to jump to a pinned conversation.
-
Right-click on a message and select Show Times to view exact
timestamps for each message.
- Right-click the Messages icon in the Dock to quickly view and jump to
unread conversations.
Photos
- Drag an item to the "My Albums" header section to quickly create an
album with that item.
- After adding an item to an album, use ⌃⌘A to add other items to that
same album.
- When editing an image, hold down the
Mkey to compare the
modifications to the original.
- Hold
Optionwhile launching Photos to choose a different photo
library to open.
- Drag a photo from the Photos app into a Finder window to quickly
export the photo, or into the Mail or Messages app to attach the
photo.
-
When editing an image, double-click an adjustment slider to reset it.
-
When editing an image, hold
Optionwhile holding the pointer over an
adjustment slider to extend the adjustment range.
- Hold
Optionwhile clicking the rotate button to reverse the rotation
direction.
TextEdit
-
In rich text mode, press
Option-Tabto insert an outlined list. -
Press
Option-Escapeto autocomplete the current word. -
Press ⌃⌥⌘P in the find text field (⌘F) to access advanced search
operators.
-
Hold
Optionwhile selecting text to make vertical text selections. -
The select line dialog (⌘L) supports the following formats:
1-3 selects lines 1-3 in the document
+2 selects the 2nd line below the cursor
-2 selects the 2nd line above the cursor
+2-4 selects 3 lines, starting from 2 lines below the cursor
-2-4 selects 3 lines, starting from 2 lines above the cursor
Terminal
-
Press ⇧⌘A to select the output from the previous command.
-
Press ⌘L to clear the output from the previous command.
-
Press ⌃⌘V to paste and format text that is properly escaped for the
shell.
- Press ⌃T while a command is executing to view runtime statistics about
the execution so far.
- Press ⌘{↑,↓} to select the previous/next commands. Then press ⇧⌘A to
select the output of the currently selected command.
-
Press ⇧⌘I to set a title for the current window and tab.
-
Drag a file or folder into a Terminal window to insert its full path.
Alternatively, copy a file or folder in Finder and paste it in
Terminal to insert its path.
Calculator
- Press ⌘T to open a new window that keeps a running history of
calculations.
-
Press ⌘R to enable Reverse Polish notation (RPN) mode.
-
Press
pto insert pi. -
Right-click the number display and select "Large Type" to view the
current result in a large overlay window.
-
Use the Convert menu to perform various unit conversions.
-
In Programmer view (⌘3), click the individual binary bits to toggle
between 0 and 1.
QuickTime Player
- Grab a single frame from a video by pausing on the desired frame
(using the Left and Right arrow keys to navigate individual frames)
and pressing ⌘C.
Photo Booth
-
Hold
Optionwhile taking a picture to skip the countdown. -
Hold
Shiftwhile taking a picture to disable the screen flash. -
When choosing one of the distortion effects (on the third page), click
and drag the cursor on the image preview to change the effects origin.
iOS Tips & Tricks
General
- Touch and hold the back button on a navigation bar to view the entire
navigation history.
- Tap the status bar at the top of the screen to scroll to the top of
the current page.
-
Touch and hold the scroll bar to drag it to a new scroll position.
-
In a list with selectable items (e.g. Mail, Messages, Notes), tap with
2 fingers to select an item, and then keep dragging with 2 fingers to
select more items.
-
Touch and hold items in Control Center to access more options.
-
In the print dialog, pinch outward from the print preview at the
bottom to create a PDF of the printed content.
-
Double tap on a Picture-in-Picture (PiP) video to change its size.
-
Touch and hold on the flashlight icon in Control Center to change the
flashlight brightness level.
- Touch and hold on a time input wheel to bring up a number pad to enter
an exact time.
- Tap and hold on a screenshot preview to directly bring up the share
sheet.
Keyboard
- Touch and hold the Space bar to move the cursor. While still holding
the Space bar, tap the keyboard area with another finger to create a
text selection.
- Touch and hold the emoji icon to switch to a one-side keyboard for
one-handed typing.
- Pinch in with three fingers to copy the selected text. Pinch in twice
to cut.
-
Pinch out with three fingers to paste.
-
Tap with three fingers to bring up the text toolbar.
-
Swift left and right with three fingers to undo and redo.
-
Touch and hold the 123 key to automatically go back after selecting a
character.
Swipe to a number after pressing the 123 key to automatically select a
single number.
-
Double tap on text to select a word. Triple tap to select a sentence.
-
To temporarily enable caps lock, use one finger to hold the shift key
while using the other finger to type letters.
-
Tap on the original text box to exit emoji keyboard search mode.
-
Long press on a letter key to insert an accented variant.
Long press on the 0 key to insert a degrees symbol.
Home Screen
- If an app within a folder has a notification, long press on the folder
to quickly open the app with the notification.
- Instead of dragging an app icon across multiple home page screens, use
one finger to select the app icon and use another finger to swipe
across home screen pages.
- Move multiple app icons simultaneously by tapping on the other icons
to create a drag group.
Safari
-
Touch and hold the new tab button to see recently closed tabs.
-
In the tab viewer screen, swipe up to get a search control, and press
down on the Cancel button to close all tabs matching the search text.
- In the tab viewer screen, long press on any tab to change how the tabs
are arranged/sorted.
-
Tap on a link with two fingers to open it in the background.
-
To take a screenshot of the entire webpage, take a screenshot like
normal and then switch to the Full Page tab at the top of the
screenshot preview.
- Touch and hold the bookmarks button in the bottom bar to add the
current webpage to the Reading List.
- Touch and hold the tabs button in the bottom bar (the double square
icon) to switch between tab groups and access tab management actions.
- When the address bar is at the bottom (Settings > Safari > Tabs >
Tab Bar), swipe horizontally across the address bar to move between
tabs. Swipe up on the address bar to view all tabs.
- Touch and hold on the reader icon in the address bar to toggle reader
mode.
Camera
- Touch and hold the shutter button to quickly start taking a video
(without having to first switch to video mode).
-
Drag the shutter button to the left to take a burst of images.
-
Touch and hold on part of the picture preview to lock auto-focus.
-
Enable
Settings > Camera > Mirror Front Camerato have the
front-facing camera preview the same orientation as the picture will
be taken.
Clock
- Timers can be configured to stop playing the current audio source
(YouTube, Spotify, etc.) when the timer expires.
-
Touch and hold the Compose mail icon to view drafts.
-
Touch and hold an email and select
More > Notify Meto get
notifications for that specific email thread.
- Touch and hold on the Trash icon when viewing a message to archive the
message instead of deleting it.
Messages
- When sending a message using iMessage, long press on the send button
to add an animation.
- Swipe to the left in a conversation to see exact timestamps.
Notes
- Tap on the timestamp at the top of a note to toggle between Created At
and Edited At.
- In a bulleted or numbered list, swipe left or right on a list element
to indent or unindent.
Calculator
- Delete the last digit by swiping horizontally.
Apple Maps
- To zoom with one finger, double tap and keep pressing after the second
tap, and then move the finger up and down to zoom in and out.
Siri
- Say "Learn to pronounce [name of contact]" to teach Siri to
correctly pronounce a particular name.
- Say "Remind me about this" to create a reminder that is linked to
whatever is currently on the screen.
- Say "[Name of contact] is my {husband,wife,boss}" to be able to
refer to them by that moniker. Alternatively, assign the contact a
nickname in the Contacts app to refer to them to Siri with that
nickname.
- Say "Split a check [number] ways" to have Siri help split a bill and
calculate tip.
- Ask "What flights are overhead?" to get flight numbers and altitudes
of overhead planes.
App Store
- Turn off
Settings > App Store > In-App Ratings & Reviewsto stop
getting nagged about app reviews.
Phone
-
Tap the green dial button to re-dial the previous number.
-
To end a call without making it look like you hung up, switch to
Airplane Mode which will show the call as failed.
-
Dial
*3001#12345#*to access advanced cellular data diagnostic info. -
Touch and hold
0to input a+to enter a country code. -
Long press on the Mute button to put the call on hold.
Settings
- Touch and hold the "Download and Install" button on the software
update screen to view an additional option to install the software
update later that night.
TODO
Currently just pasted from github.com/schaafjs/mac
Warning
Currently just pasted from schaafjs/mac.
Needs to be cleaned up someday. 😉
Reindex Spotlight
Manual installs (not on homebrew)
http://www.bresink.com/osx/0TinkerTool/download.php
Setup
TODO: Screenshots of all heavily used apps with the settings or document changed settings manually.
Dump packages
Manual
TODO: After everything is set up, some programs have to be added to autostart, some hidden, some not hidden.
Can most likely not be automated.
Mailbox.org reference guide: https://kb.mailbox.org/en/private/e-mail-article/setup-with-mail-app-for-macos-x
ENV vars
homebrew_no_env_hints
Find out how to properly configure first.
Tinkering
http://www.bresink.com/osx/0TinkerTool/download-de.php
https://web.archive.org/web/20150621044359/http://secrets.blacktree.com/
https://pawelgrzybek.com/change-macos-user-preferences-via-command-line/
Automation with
https://github.com/geerlingguy/ansible-collection-mac
Inspiration: https://github.com/geerlingguy/mac-dev-playbook
Privacy
TODO: Integrate the script generated by privacy.sexy as currently found in ./privacy-script.sh into the rest of the workflow.
Disable homebrew analytics and VS Code telemetry (or switch to VS Codium?).
Hardening
https://github.com/drduh/macOS-Security-and-Privacy-Guide
https://www.bejarano.io/hardening-macos/
https://www.kuketz-blog.de/hardening-macos-absichern-und-privatsphaere-verbessern/
Backups
Set up automatic backups using borgmatic (https://www.borgbackup.org/) through Vorta (https://vorta.borgbase.com/) to both BorgBase (https://borgbase.com/) and a Hetzner StorageBox (https://community.hetzner.com/tutorials/install-and-configure-borgbackup/de).
Monitor backups using healthchecks.io
SSH
TODO: After installing Secretive.app, add the following block to the beginning of the config file in .ssh/ (should be automated/added to the dotfiles by default).
# Assumes user account `julius` path to executable has to be changed otherwise
Host *
IdentityAgent /Users/julius/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh
Z shell
P10k
Custom Fonts
-
TODO: Meslo Font Family as already installed for P10k
-
TODO: JetBrains Mono: somehow
wgetand ideally also install the whole thing by unzipping,cd'ing intottf/and installing the whole font family.
Install both ligature (JetBrains Mono) and non-ligature version (JetBrains Mono NL)
TODO: Dock
TODO: Autohide Dock, put windows behind dock icons and change windows animation to linear
Change animation time for Dock
Can either be an integer or a float, determining the time to fully showing the dock in seconds.
Trigger system screensaver manually
Change dock icon size & lock dock icon size (becomes unchangable through draging on it)
defaults write com.apple.dock tilesize -int 58; killall Dock
defaults write com.apple.dock size-immutable -bool yes && killall Dock
customization
https://github.com/lysyi3m/macos-terminal-themes
Changing settings using defaults write
TODO: Speech2Text
https://github.com/sveinbjornt/hear wraps the native mac OS API's for this.
Extend by allowing different languages and and attempting to convert to compatible format for text detection if not given as one.
See man page: https://sveinbjorn.org/files/manpages/hear.1.html
TODO: Window management
command + n: new windows
command + w: close windows (sometimes closes application)
command + q: quit application (and close all open windows)
Improved syntax highlighting in nano
https://github.com/scopatz/nanorc
Use install script but pin to git commit hash to ensure integrity and no takeover or simply copy the install script or check into this repo via submodule (if possible).
fzf
Install via homebrew and setup keybindings as outlined here: https://github.com/junegunn/fzf#using-homebrew
QuickLook Extensions
https://github.com/chamburr/glance#installation
brew install --cask qlcolorcode qlstephen qlmarkdown quicklook-json qlprettypatch quicklook-csv qlimagesize webpquicklook quicklookase qlvideo
https://github.com/sindresorhus/quick-look-plugins
It's important to remove the quarantine attributed from the installed quicklook extensions, they will not work otherwise!
LaTeX
MacTeX1 is already installed using brew.
Installing nonfree fonts
First, Terminal must be restarted in order for the commands added by MacTeX to be usable.
Running exec zsh is not sufficient!
cd ~/Downloads
wget http://www.tug.org/fonts/getnonfreefonts/install-getnonfreefonts
sudo texlua install-getnonfreefonts
sudo getnonfreefonts --sys -a
Don't echo automatic homebrew cleanup messages to shell.
Fix minted not picking up installed Pygments installation
ln -s /path/to/pygmentize /usr/local/bin/pygmentize
````
# Housekeeping and maintenance
## Git Cleanup commands
1. Iterate through all folders in `Developer/`.
2. If folder is a git repository, run commands.
Commands:
```shell
# Expire all the unreachable content and pack the repo in the most
# compact way.
git gc --aggressive --prune=now
# also clear the reflog as well
git reflog expire --expire=now --all
Vacuum Apple Mail database
https://gist.github.com/ttscoff/3728277
Currently best version seems to be in the comments: https://gist.github.com/ttscoff/3728277?permalink_comment_id=4383848#gistcomment-4383848
-
Quit Apple Mail
-
Get before size of index
-
Vacuum index
-
Get after size of index
-
Echo before and after sizes + diff to shell
Brew update, upgrade & cleanup
Mac App Store Updates
Commands and keyboard shortcuts
Symbols
Tilde
⌥ option + n yields ~.
Pipe
⌥ option + 7 yields |.
Brackets
-
⌥ option + 5 yields
[. -
⌥ option + 6 yields
]. -
⌥ option + 8 yields
{. -
⌥ option + 9 yields
}.
Cut and Paste
⌘ command + C to copy,
⌘ command + ⌥ option + v to paste while cutting from the original location.
Screenshot to clipboard
-
Screenshot of whole screen: ⇧ shift, ⌘ command, ⌃ control, 3
-
Screenshot of selection: ⇧ shift, ⌘ command, ⌃ control, 4
-
Open Screenshot.app: ⇧ shift , ⌘ command, 5
Recenter Spotlight search window
https://apple.stackexchange.com/a/225746
Find mounted volumes
https://apple.stackexchange.com/a/70520
-
MacTeX on the website of the TeX Users Group: https://www.tug.org/mactex/. ↩