The Dock of Mac Cheat Sheet

A Software › Mac / OSX cheat sheet in English by Dr. Edu

The Dock is a prominent feature of macOS's graphical user interface. By default, it's on the bottom of the screen, but can be positioned on the left or right side. The Dock offers a convenient way to launch applications, switch between running ones, and access frequently used items. It is used to launch applications and to switch between running applications.

3,881 views 1,505 downloads 3 Feb 2025 History

The Dock

The Dock is a prominent feature of the graphical user interface of macOS. It is used to launch applic­ations and to switch between running applic­ations.

macOS Dock

macOS Dock

Keyboard shortcuts and actions

Keypress
Action
⌃ + fn + F3
Show or Focus on the Dock
⌃ + F3
Show or Focus on the Dock when Fn keys are locked
⌥ + ⌘ + D
Show/hide the Dock
⟵
Select left applic­ation
⟶
Select right applic­ation
Enter
Switch to the selected applic­ation

Managing the Dock through defaults

Additi­onally to System Settings, the Dock can be adjusted using the defaults command (from the command line, using the Terminal applic­ation or any similar). All these commands requires to relaunch the Dock. So, for practical purposes, all the commands shown here includes the {{lang-bash}}killall Dock command.

If you feel your Dock config­­ur­ation is getting messy at any time, you can reset it to the default config­­ur­ation and start over. The section on Resetting the Dock in this cheat sheet.

The defaults command

The defaults command allows users to read, write, and delete macOS user defaults from a comman­d-line shell.

defaults actions

Action
Descri­ption
read
Prints all of the user's defaults, for every domain, to standard output.
write
Writes value as the value for key in domain. value must be a property list, and must be enclosed in single quotes.
delete
Removes all default inform­ation for domain or a key ion a domain

Domains, keys and values

A default belong to a domain, a domain name of the form com.companyname.appname, which typically correspond to individual applications.

Each domain has a dictionary of keys and values representing its defaults; for example, "Default Font" = "Helvetica".

Keys are always strings, but values can be complex data structures comprising arrays, dictionaries, strings, and binary data. These data structures are stored as XML property lists.
Flag
Type
-string
Default value type if no flag type is provided. Allows the user to specify a string as the value for the given preference key.
-int[eger]
Allows the user to specify an integer as the value for the given preference key.
-float
Allows the user to specify a floating point number as the value for the given preference key.
-bool[ean]
Allows the user to specify a boolean as the value for the given preference key. Value must be TRUE, FALSE, YES, or NO
 
For more inform­ation on other flags, consult the online help in the command line via Terminal or similar applic­ations, e.g. type:

$ man defaults

Conven­tions for code

Commands are shown using a non-proportional font. Placeholders (elements to substitute) are shown in italic. Lines too long are shown with a BASH "backslash continuation line" character.

Spaces, size and effects

Adding an space between the icons in the Dock
defaults write com.ap­ple.dock persis­ten­t-apps \
  -array-add '{"tile-type"="spacer-tile";}'
 killall Dock
Size of the Dock
defaults write com.ap­ple.dock tilesize -float 48
 killall Dock
Magnif­ication size
defaults write com.ap­ple.dock largesize -int 128
 killall Dock

Applic­ations

To show all windows of an applic­ation doing an scroll action on the icon
defaults write com.ap­ple.dock scroll­-to­-open \
    -bool TRUE; killall Dock
To keep only the active applic­ations
defaults write com.ap­ple.dock static­-only \
  -bool TRUE; killall Dock
To highlight hidden (⌘ + H) applic­ations
defaults write com.ap­ple.dock showhidden -bool TRUE
killall Dock

Reaction time

Time to show or to hide
defaults write com.ap­ple.Dock autohi­de-­delay \
  -float 0.4;ki­llall Dock
Animation time to show or to hide the Dock
defaults write com.ap­ple.dock \
  autohide-time-modifier -float 1; killall Dock

Querying the Dock

Reviewing the Dock settings
defaults read setting
Example (reviewing the autohi­de-­delay setting).
defaults read com.ap­ple.dock autohi­de-­delay

Resetting the Dock

Resetting a specific setting could be done by deletion
defaults delete com.ap­ple.dock autohi­de-­delay; killall Dock
Resetting everything to the factory settings
defaults delete com.ap­ple.dock; killall Dock

Applic­ations

Some applic­ations for management or enhanc­ement of the Dock.

References

1. "Dock (macOS)", Wikipedia, web. Visited: 2024.1­2.18. URL: https:­//e­n.w­iki­ped­ia.o­rg­/wi­ki/­Doc­k_(­macOS))
2. "The Dock on your Mac", Apple Inc., web. Visited: 2024.1­2.18. URL: https:­//s­upp­ort.ap­ple.co­m/e­n-c­a/g­uid­e/m­acb­ook­-ai­r/a­pd4­b7f­b73­1f/mac

Online help

Manual pages with detailed inform­ation on the defaults command is available from the command line with:
man defaults
Additi­onally, a quick usage reference is provided with:
defaults -h

History

Version
1.1.0

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.