macOS-defaults

repository·main·Indexed 23 days ago

https://github.com/yannbertrand/macos-defaults

A curated collection of macOS `defaults` commands for programmatically managing System Settings. It includes a searchable interface and documentation for manipulating system and application configurations, such as Activity Monitor Dock icons, update frequencies, and Finder desktop visibility. The project provides a discovery workflow using a `diff.sh` script and `defaults find` to identify keys and domains.

Tokens
26.9K
Snippets
215
Records
303
Agent score
81%

What's inside macos-defaults

  1. Understand macOS defaults and domains

    main

    macOS applications and system services use the defaults system to store user preferences (like fonts or panel positions) in XML Property Lists.

    Key concepts:

    • Domains: Preferences are organized into domains, which usually correspond to specific applications.
    • NSGlobalDomain: A shared domain used by multiple applications and system services. If a preference is not found in an application's specific domain, the system may look in NSGlobalDomain.
    • Keys and Values: Each domain contains a dictionary of keys (strings) and values (which can be strings, arrays, dictionaries, or binary data).
  2. Standard macOS screenshot keyboard shortcuts

    main

    macOS provides several built-in keyboard shortcuts for capturing the screen:

    • Fullscreen capture: ⌘ cmd + ⇧ shift + 3 captures the entire screen.
    • Selection capture: ⌘ cmd + ⇧ shift + 4 allows you to select a specific area. After selecting the area, you can press space to capture an entire application window.
    • Screenshot utility: ⌘ cmd + ⇧ shift + 5 opens the Screenshot app/interface for more granular options.
  3. Configure the Menu Bar digital clock format

    main

    You can customize the time and date format displayed in the macOS Menu Bar digital clock by modifying the DateFormat key in the com.apple.menuextra.clock domain.

    Accepted format tokens include:

    • ss: seconds
    • HH: 24-hour clock
    • EEE: 3-letter day of the week
    • d MMM: day of the month and 3-letter month

    Note: Accepted values depend on your system's Language & Region settings. This has been tested on macOS Monterey, Big Sur, and Catalina.

    defaults write com.apple.menuextra.clock "DateFormat" -string "\"EEE d MMM HH:mm:ss\""