macos-terminal-tweaks.md (22244B)
1 --- 2 title: "macOS Terminal Tweaks" 3 description: "defaults write com.apple.dock autohide-delay -float 0; killall Dock" 4 category: linux-it 5 tags: ["linux-it"] 6 tools: ["Responder"] 7 difficulty: intermediate 8 updated: "2026-08-10" 9 source: "vault:macOS Terminal Tweaks Cheat Sheet.md" 10 --- 11 # ๐ macOS Hidden Terminal Tweaks โ Cheat Sheet 12 13 > [!info] How `defaults` works 14 > `defaults write <domain> <key> <type> <value>` writes a preference. 15 > `defaults delete <domain> <key>` removes it (restoring the macOS default). 16 > Most changes need the affected app restarted โ commands below include `killall` where needed. 17 > `killall SystemUIServer` restarts the menu bar. `killall Dock` restarts the Dock. 18 19 --- 20 21 ## ๐๏ธ Table of Contents 22 23 - #๐ข Dock 24 - #๐ Finder 25 - #๐ฅ๏ธ Desktop 26 - #๐ธ Screenshots 27 - #๐ฌ Animations & UI Speed 28 - #๐ Mission Control & Spaces 29 - #โจ๏ธ Keyboard 30 - #๐ฑ๏ธ Trackpad & Mouse 31 - #๐งญ Safari 32 - #๐ฌ Mail 33 - #๐ TextEdit 34 - #๐ Calendar 35 - #๐ฆ Spotlight 36 - #โก Power & Sleep (pmset) 37 - #๐ Network 38 - #๐ Security & Privacy 39 - #๐ Activity Monitor 40 - #โฑ๏ธ Time Machine 41 - #๐ Launchpad 42 - #๐ Hot Corners Reference 43 - #๐ ๏ธ Miscellaneous System 44 45 --- 46 47 ## ๐ข Dock 48 49 ### Autohide Behaviour 50 ```bash 51 # Delay before Dock appears on hover (0 = instant) 52 defaults write com.apple.dock autohide-delay -float 0; killall Dock 53 54 # Animation speed (0 = instant, 1 = default) 55 defaults write com.apple.dock autohide-time-modifier -float 0.2; killall Dock 56 57 # Enable autohide 58 defaults write com.apple.dock autohide -bool true; killall Dock 59 60 # Reset both to macOS defaults 61 defaults delete com.apple.dock autohide-delay 62 defaults delete com.apple.dock autohide-time-modifier 63 killall Dock 64 ``` 65 66 ### Appearance & Size 67 ```bash 68 # Dock icon size (pixels, default 48) 69 defaults write com.apple.dock tilesize -int 48; killall Dock 70 71 # Enable magnification 72 defaults write com.apple.dock magnification -bool true; killall Dock 73 74 # Magnification size (pixels) 75 defaults write com.apple.dock largesize -int 72; killall Dock 76 77 # Dock position: bottom | left | right 78 defaults write com.apple.dock orientation -string "bottom"; killall Dock 79 80 # Minimise window effect: genie | scale | suck 81 defaults write com.apple.dock mineffect -string "scale"; killall Dock 82 83 # Dim hidden app icons 84 defaults write com.apple.dock showhidden -bool true; killall Dock 85 86 # Show indicator dots for open apps 87 defaults write com.apple.dock show-process-indicators -bool true; killall Dock 88 89 # Show recent apps section 90 defaults write com.apple.dock show-recents -bool false; killall Dock 91 ``` 92 93 ### Behaviour 94 ```bash 95 # Only show apps that are open (no pinned apps) 96 defaults write com.apple.dock static-only -bool true; killall Dock 97 98 # Single app mode (hides all other apps when switching) 99 defaults write com.apple.dock single-app -bool true; killall Dock 100 101 # Scroll up on Dock icon to show Exposรฉ for that app 102 defaults write com.apple.dock scroll-to-open -bool true; killall Dock 103 104 # Enable spring-loading for all Dock items 105 defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true; killall Dock 106 107 # Disable launch animation bounce 108 defaults write com.apple.dock launchanim -bool false; killall Dock 109 110 # Add a blank spacer tile to the Dock 111 defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'; killall Dock 112 ``` 113 114 ### Launchpad / Springboard Animation Speeds 115 ```bash 116 defaults write com.apple.dock springboard-show-duration -float 0.1; killall Dock 117 defaults write com.apple.dock springboard-hide-duration -float 0.1; killall Dock 118 defaults write com.apple.dock springboard-page-duration -float 0.15; killall Dock 119 ``` 120 121 --- 122 123 ## ๐ Finder 124 125 ### Show / Hide 126 ```bash 127 # Show hidden files (dotfiles) 128 defaults write com.apple.finder AppleShowAllFiles -bool true; killall Finder 129 130 # Show all filename extensions 131 defaults write NSGlobalDomain AppleShowAllExtensions -bool true; killall Finder 132 133 # Show path bar at the bottom 134 defaults write com.apple.finder ShowPathbar -bool true; killall Finder 135 136 # Show status bar at the bottom 137 defaults write com.apple.finder ShowStatusBar -bool true; killall Finder 138 139 # Show full POSIX path in title bar 140 defaults write com.apple.finder _FXShowPosixPathInTitle -bool true; killall Finder 141 142 # Allow quitting Finder via Cmd+Q 143 defaults write com.apple.finder QuitMenuItem -bool true; killall Finder 144 145 # Keep folders on top when sorting by name 146 defaults write com.apple.finder _FXSortFoldersFirst -bool true; killall Finder 147 148 # Keep folders on top on the Desktop too 149 defaults write com.apple.finder _FXSortFoldersFirstOnDesktop -bool true; killall Finder 150 ``` 151 152 ### Default View 153 ```bash 154 # Set default view style: 155 # Nlsv = List | icnv = Icon | clmv = Column | Flwv = Gallery 156 defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"; killall Finder 157 ``` 158 159 ### Warnings & Behaviour 160 ```bash 161 # Disable extension change warning 162 defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false; killall Finder 163 164 # Disable Trash empty warning 165 defaults write com.apple.finder WarnOnEmptyTrash -bool false; killall Finder 166 167 # Auto-remove items from Trash after 30 days 168 defaults write com.apple.finder FXRemoveOldTrashItems -bool true; killall Finder 169 170 # Disable iCloud as default save location 171 defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false 172 173 # Expand save panel by default 174 defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true 175 defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true 176 177 # Expand print panel by default 178 defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true 179 defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true 180 ``` 181 182 ### Search Scope 183 ```bash 184 # Search current folder by default (SCcf = current folder | SCev = entire volume) 185 defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"; killall Finder 186 ``` 187 188 ### Animations 189 ```bash 190 # Disable all Finder animations 191 defaults write com.apple.finder DisableAllAnimations -bool true; killall Finder 192 ``` 193 194 --- 195 196 ## ๐ฅ๏ธ Desktop 197 198 ```bash 199 # Hide all desktop icons (useful for presentations / clean screenshots) 200 defaults write com.apple.finder CreateDesktop -bool false; killall Finder 201 202 # Show hard drives on Desktop 203 defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true; killall Finder 204 205 # Show external hard drives on Desktop 206 defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true; killall Finder 207 208 # Show mounted network servers on Desktop 209 defaults write com.apple.finder ShowMountedServersOnDesktop -bool true; killall Finder 210 211 # Show removable media (USB, SD) on Desktop 212 defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true; killall Finder 213 ``` 214 215 --- 216 217 ## ๐ธ Screenshots 218 219 ```bash 220 # Change save location (change path as needed) 221 defaults write com.apple.screencapture location ~/Desktop 222 223 # Change file format: png | jpg | heic | gif | pdf | tiff 224 defaults write com.apple.screencapture type -string "png" 225 226 # Disable shadow / drop shadow around window screenshots 227 defaults write com.apple.screencapture disable-shadow -bool true 228 229 # Disable floating thumbnail (the preview in corner after screenshot) 230 defaults write com.apple.screencapture show-thumbnail -bool false 231 232 # Don't include date in screenshot filename 233 defaults write com.apple.screencapture include-date -bool false 234 235 # Apply changes (no restart needed after this) 236 killall SystemUIServer 237 ``` 238 239 --- 240 241 ## ๐ฌ Animations & UI Speed 242 243 > [!tip] Disable all animations for max speed 244 > Run all blocks below for a completely snappy UI experience. 245 246 ### System-Wide (NSGlobalDomain) 247 ```bash 248 # Disable window open/close animations 249 defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false 250 251 # Disable scroll animations 252 defaults write NSGlobalDomain NSScrollAnimationEnabled -bool false 253 254 # Speed up window resize time (default 0.2, lower = faster) 255 defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 256 257 # Disable rubber-band / elastic scrolling 258 defaults write NSGlobalDomain NSScrollViewRubberbanding -bool false 259 260 # Speed up Quick Look panel animation 261 defaults write NSGlobalDomain QLPanelAnimationDuration -float 0 262 263 # Speed up toolbar full screen animation 264 defaults write NSGlobalDomain NSToolbarFullScreenAnimationDuration -float 0 265 266 # Speed up column browser animation 267 defaults write NSGlobalDomain NSBrowserColumnAnimationSpeedMultiplier -float 0.001 268 269 # Disable version browser animation 270 defaults write NSGlobalDomain NSDocumentRevisionsWindowTransformAnimation -bool false 271 ``` 272 273 ### Dock 274 ```bash 275 defaults write com.apple.dock expose-animation-duration -float 0.1; killall Dock 276 defaults write com.apple.dock launchanim -bool false; killall Dock 277 ``` 278 279 ### Finder 280 ```bash 281 defaults write com.apple.finder DisableAllAnimations -bool true; killall Finder 282 ``` 283 284 ### Mail 285 ```bash 286 defaults write com.apple.mail DisableReplyAnimations -bool true 287 defaults write com.apple.mail DisableSendAnimations -bool true 288 ``` 289 290 --- 291 292 ## ๐ Mission Control & Spaces 293 294 ```bash 295 # Speed up Mission Control animation 296 defaults write com.apple.dock expose-animation-duration -float 0.1; killall Dock 297 298 # Don't automatically rearrange Spaces based on use 299 defaults write com.apple.dock mru-spaces -bool false; killall Dock 300 301 # Group windows by application in Mission Control 302 defaults write com.apple.dock expose-group-apps -bool true; killall Dock 303 304 # Displays have separate Spaces 305 defaults write com.apple.spaces spans-displays -bool false; killall Dock 306 307 # Switch to a Space with an open window when switching apps 308 defaults write NSGlobalDomain AppleSpacesSwitchOnActivate -bool true 309 ``` 310 311 --- 312 313 ## โจ๏ธ Keyboard 314 315 ```bash 316 # Enable key repeat (disable accent popup on hold) 317 defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false 318 319 # Key repeat rate (lower = faster, minimum ~1) 320 defaults write NSGlobalDomain KeyRepeat -int 2 321 322 # Delay before key repeat starts (lower = faster, minimum ~10) 323 defaults write NSGlobalDomain InitialKeyRepeat -int 15 324 325 # Enable full keyboard navigation (Tab between all controls) 326 defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 327 328 # Disable smart quotes (useful for coding) 329 defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false 330 331 # Disable smart dashes 332 defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false 333 334 # Disable autocorrect 335 defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false 336 337 # Disable auto-capitalisation 338 defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false 339 340 # Disable double-space period shortcut 341 defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false 342 ``` 343 344 --- 345 346 ## ๐ฑ๏ธ Trackpad & Mouse 347 348 ### Trackpad 349 ```bash 350 # Enable tap to click 351 defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true 352 defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true 353 defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 354 355 # Enable three-finger drag 356 defaults write com.apple.AppleMultitouchTrackpad TrackpadThreeFingerDrag -bool true 357 defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -bool true 358 359 # Disable natural scrolling 360 defaults write NSGlobalDomain com.apple.swipe-navigate-with-scrolls -bool false 361 362 # Enable swipe-to-navigate in browsers 363 defaults write NSGlobalDomain AppleEnableSwipeNavigateWithScrolls -bool true 364 ``` 365 366 ### Mouse 367 ```bash 368 # Disable mouse acceleration (linear movement) 369 defaults write .GlobalPreferences com.apple.mouse.linear -bool true 370 371 # Set mouse tracking speed (0.0โ3.0) 372 defaults write NSGlobalDomain com.apple.mouse.scaling -float 2.5 373 374 # Set scroll speed 375 defaults write NSGlobalDomain com.apple.scrollwheel.scaling -float 0.6875 376 ``` 377 378 --- 379 380 ## ๐งญ Safari 381 382 ```bash 383 # Show full URL in address bar (not just domain) 384 defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true 385 386 # Disable search suggestions 387 defaults write com.apple.Safari SuppressSearchSuggestions -bool true 388 defaults write com.apple.Safari UniversalSearchEnabled -bool false 389 390 # Enable Develop menu 391 defaults write com.apple.Safari IncludeDevelopMenu -bool true 392 defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true 393 394 # Enable debug menu 395 defaults write com.apple.Safari IncludeInternalDebugMenu -bool true 396 397 # Disable auto-opening of downloaded "safe" files 398 defaults write com.apple.Safari AutoOpenSafeDownloads -bool false 399 400 # Set history limit in days (default 31) 401 defaults write com.apple.Safari WebKitHistoryAgeInDaysLimit -int 365 402 403 # Disable thumbnail cache for History and Top Sites 404 defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 405 ``` 406 407 --- 408 409 ## ๐ฌ Mail 410 411 ```bash 412 # Disable send animation 413 defaults write com.apple.mail DisableSendAnimations -bool true 414 415 # Disable reply animation 416 defaults write com.apple.mail DisableReplyAnimations -bool true 417 418 # Copy email addresses as 'Name <email>' not just 'email' 419 defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool true 420 421 # Disable inline attachments (show as icons) 422 defaults write com.apple.mail DisableInlineAttachmentViewing -bool true 423 424 # Disable spell checking 425 defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnabled" 426 ``` 427 428 --- 429 430 ## ๐ TextEdit 431 432 ```bash 433 # Use plain text mode by default 434 defaults write com.apple.TextEdit RichText -int 0 435 436 # Set encoding to UTF-8 437 defaults write com.apple.TextEdit PlainTextEncoding -int 4 438 defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 439 440 # Disable smart quotes in TextEdit 441 defaults write com.apple.TextEdit SmartQuotes -bool false 442 ``` 443 444 --- 445 446 ## ๐ Calendar 447 448 ```bash 449 # Show week numbers 450 defaults write com.apple.iCal "Show Week Numbers" -bool true 451 452 # Set first day of week: 0=Sunday, 1=Monday, 2=Tuesday... 453 defaults write com.apple.iCal "first day of week" -int 1 454 455 # Show 24-hour clock 456 defaults write com.apple.iCal "number of hours displayed" -int 14 457 ``` 458 459 --- 460 461 ## ๐ฆ Spotlight 462 463 ```bash 464 # Disable Spotlight indexing for a volume 465 sudo mdutil -i off / 466 467 # Enable Spotlight indexing for a volume 468 sudo mdutil -i on / 469 470 # Rebuild Spotlight index for a volume 471 sudo mdutil -E / 472 473 # Disable Spotlight indexing for ALL volumes 474 sudo mdutil -a -i off 475 ``` 476 477 --- 478 479 ## โก Power & Sleep (pmset) 480 481 > [!warning] These require `sudo` 482 483 ```bash 484 # Show current power settings 485 pmset -g 486 487 # Set display sleep time in minutes (0 = never) 488 sudo pmset -a displaysleep 10 489 490 # Set system sleep time in minutes (0 = never) 491 sudo pmset -a sleep 30 492 493 # Disable Power Nap (background activity while sleeping) 494 sudo pmset -a powernap 0 495 496 # Enable Wake on Network Access 497 sudo pmset -a womp 1 498 499 # Set standby delay in seconds (default 10800 = 3 hours) 500 sudo pmset -a standbydelay 86400 501 502 # Disable TCP keep-alive during sleep (saves battery) 503 sudo pmset -a tcpkeepalive 0 504 505 # Hibernate mode: 506 # 0 = sleep only (RAM powered, fast wake) 507 # 3 = default (sleep + save to disk, safe) 508 # 25 = hibernate only (slowest, safest for battery) 509 sudo pmset -a hibernatemode 0 510 ``` 511 512 ### Caffeinate (prevent sleep temporarily) 513 ```bash 514 # Prevent system from sleeping (Ctrl+C to stop) 515 caffeinate 516 517 # Prevent display from sleeping 518 caffeinate -d 519 520 # Prevent idle sleep 521 caffeinate -i 522 523 # Keep system awake for N seconds (e.g. 1 hour) 524 caffeinate -t 3600 525 526 # Keep system awake until a specific process finishes 527 caffeinate -w <PID> 528 ``` 529 530 --- 531 532 ## ๐ Network 533 534 ```bash 535 # Flush DNS cache 536 sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder 537 538 # List all network interfaces 539 networksetup -listallnetworkservices 540 541 # Turn Wi-Fi off / on 542 networksetup -setairportpower en0 off 543 networksetup -setairportpower en0 on 544 545 # Show current Wi-Fi SSID 546 networksetup -getairportnetwork en0 547 548 # Set DNS servers 549 sudo networksetup -setdnsservers Wi-Fi 1.1.1.1 8.8.8.8 550 551 # Show public IP address 552 curl ifconfig.me 553 554 # List open network connections 555 lsof -i 556 557 # List listening ports 558 sudo lsof -i -P | grep LISTEN 559 ``` 560 561 --- 562 563 ## ๐ Security & Privacy 564 565 ```bash 566 # Disable Gatekeeper quarantine warning ("App can't be opened") 567 defaults write com.apple.LaunchServices LSQuarantine -bool false 568 569 # Re-enable quarantine warning 570 defaults write com.apple.LaunchServices LSQuarantine -bool true 571 572 # Disable crash reporter dialog (reports still sent) 573 defaults write com.apple.CrashReporter DialogType -string "none" 574 575 # Re-enable crash reporter dialog 576 defaults write com.apple.CrashReporter DialogType -string "crashreport" 577 578 # Set a custom login window message 579 sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Property of [Your Name] โ [phone number]" 580 581 # Remove login window message 582 sudo defaults delete /Library/Preferences/com.apple.loginwindow LoginwindowText 583 584 # Show/enable firewall 585 sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on 586 587 # Check SIP status 588 csrutil status 589 ``` 590 591 --- 592 593 ## ๐ Activity Monitor 594 595 ```bash 596 # Set update frequency: 0=very often(0.5s), 1=often(1s), 2=normal(2s), 3=rarely(5s) 597 defaults write com.apple.ActivityMonitor UpdatePeriod -int 1 598 599 # Set Dock icon to show: 600 # 0=App Icon, 2=Network Usage, 3=Disk Activity, 4=CPU Usage, 5=CPU History 601 defaults write com.apple.ActivityMonitor IconType -int 5 602 603 # Show all processes (not just user's) 604 defaults write com.apple.ActivityMonitor ShowCategory -int 0 605 ``` 606 607 --- 608 609 ## โฑ๏ธ Time Machine 610 611 ```bash 612 # Disable Time Machine prompt when connecting new drives 613 defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true 614 615 # Disable local Time Machine backups (snapshots) 616 sudo tmutil disablelocal 617 618 # Enable local Time Machine backups 619 sudo tmutil enablelocal 620 621 # List all Time Machine snapshots 622 tmutil listlocalsnapshots / 623 624 # Delete a specific snapshot 625 tmutil deletelocalsnapshots <YYYY-MM-DD-HHMMSS> 626 ``` 627 628 --- 629 630 ## ๐ Launchpad 631 632 ```bash 633 # Reset Launchpad layout to default 634 defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock 635 636 # Speed up Launchpad open animation 637 defaults write com.apple.dock springboard-show-duration -float 0.1; killall Dock 638 639 # Speed up Launchpad close animation 640 defaults write com.apple.dock springboard-hide-duration -float 0.1; killall Dock 641 642 # Speed up Launchpad page-flip animation 643 defaults write com.apple.dock springboard-page-duration -float 0.15; killall Dock 644 645 # Change Launchpad grid layout (columns x rows) 646 defaults write com.apple.dock springboard-columns -int 8; killall Dock 647 defaults write com.apple.dock springboard-rows -int 6; killall Dock 648 ``` 649 650 --- 651 652 ## ๐ Hot Corners Reference 653 654 > [!note] Command format 655 > `defaults write com.apple.dock wvous-XX-corner -int [ACTION]` 656 > `defaults write com.apple.dock wvous-XX-modifier -int [MODIFIER]` 657 > Then `killall Dock` 658 > Replace `XX` with: `tl` (top-left), `tr` (top-right), `bl` (bottom-left), `br` (bottom-right) 659 660 ### Action Values 661 662 | Value | Action | 663 | --- | --- | 664 | `0` | Disabled / No-op | 665 | `2` | Mission Control | 666 | `3` | Application Windows | 667 | `4` | Desktop | 668 | `5` | Start Screen Saver | 669 | `6` | Disable Screen Saver | 670 | `10` | Put Display to Sleep | 671 | `11` | Launchpad | 672 | `12` | Notification Centre | 673 | `13` | Lock Screen | 674 675 ### Modifier Values 676 677 | Value | Modifier Key | 678 | --- | --- | 679 | `0` | None | 680 | `131072` | โง Shift | 681 | `262144` | โ Control | 682 | `524288` | โฅ Option | 683 | `1048576` | โ Command | 684 685 ### Example: Bottom-Right โ Lock Screen (no modifier) 686 ```bash 687 defaults write com.apple.dock wvous-br-corner -int 13 688 defaults write com.apple.dock wvous-br-modifier -int 0 689 killall Dock 690 ``` 691 692 ### Example: Top-Left โ Mission Control with Shift held 693 ```bash 694 defaults write com.apple.dock wvous-tl-corner -int 2 695 defaults write com.apple.dock wvous-tl-modifier -int 131072 696 killall Dock 697 ``` 698 699 --- 700 701 ## ๐ ๏ธ Miscellaneous System 702 703 ### System UI & Menu Bar 704 ```bash 705 # Show battery percentage in menu bar 706 defaults -currentHost write com.apple.controlcenter BatteryShowPercentage -bool true; killall SystemUIServer 707 708 # Show Bluetooth in menu bar 709 defaults -currentHost write com.apple.controlcenter Bluetooth -int 18; killall SystemUIServer 710 711 # Expand save dialog by default 712 defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true 713 714 # Disable "Application Downloaded from Internet" warning 715 defaults write com.apple.LaunchServices LSQuarantine -bool false 716 ``` 717 718 ### Terminal 719 ```bash 720 # Only allow UTF-8 in Terminal.app 721 defaults write com.apple.terminal StringEncodings -array 4 722 723 # Disable the "Are you sure you want to quit Terminal?" prompt 724 defaults write com.apple.terminal QuitTabText -bool false 725 ``` 726 727 ### App Behaviour 728 ```bash 729 # Prevent apps from being automatically terminated when idle 730 defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true 731 732 # Resume apps on launch (keep windows from last session) 733 defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool true 734 735 # Auto-quit printer app when print jobs complete 736 defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true 737 ``` 738 739 ### Disk Utility 740 ```bash 741 # Enable Disk Utility debug menu 742 defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true 743 744 # Show all partitions in Disk Utility 745 defaults write com.apple.DiskUtility advanced-image-options -bool true 746 ``` 747 748 ### Quick Look 749 ```bash 750 # Enable text selection in Quick Look 751 defaults write com.apple.finder QLEnableTextSelection -bool true; killall Finder 752 ``` 753 754 ### App Store 755 ```bash 756 # Enable WebKit Developer Tools in App Store 757 defaults write com.apple.appstore WebKitDeveloperExtras -bool true 758 759 # Enable debug menu in App Store 760 defaults write com.apple.appstore ShowDebugMenu -bool true 761 ``` 762 763 --- 764 765 ## ๐ Quick Resets 766 767 ```bash 768 # Restart Dock (apply most Dock changes) 769 killall Dock 770 771 # Restart Finder (apply most Finder changes) 772 killall Finder 773 774 # Restart SystemUIServer (apply menu bar changes) 775 killall SystemUIServer 776 777 # Restart ControlCenter (macOS 11+) 778 killall ControlCenter 779 780 # Read a specific preference to check its current value 781 defaults read com.apple.dock autohide-delay 782 783 # List ALL preferences for an app 784 defaults read com.apple.finder 785 786 # Delete a single preference key (restore default) 787 defaults delete com.apple.dock autohide-delay; killall Dock 788 ``` 789 790 --- 791 792 *Sources: [mathiasbynens/dotfiles](https://github.com/mathiasbynens/dotfiles), [macos-defaults.com](https://macos-defaults.com), [robservatory.com](https://robservatory.com/speed-up-your-mac-via-hidden-prefs/), [sickcodes gist](https://gist.github.com/sickcodes)*