Skip to content

Instantly share code, notes, and snippets.

@liddiard
Last active April 26, 2026 13:37
Show Gist options
  • Select an option

  • Save liddiard/20bf626a9e834b8b3962cb27b3551633 to your computer and use it in GitHub Desktop.

Select an option

Save liddiard/20bf626a9e834b8b3962cb27b3551633 to your computer and use it in GitHub Desktop.

Revisions

  1. liddiard revised this gist Apr 26, 2026. No changes.
  2. liddiard revised this gist Apr 26, 2026. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion import.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Run in the directory containing your plist files from the export.sh script.
    # Lists the exported plist files, removes the ".plist" extension, and imports
    # each into system/app settings.
    ls | 'sed s/\.plist$//' | xargs -I '{}' defaults import '{}' '{}'.plist
    ls *.plist | sed 's/\.plist$//' | xargs -I '{}' defaults import '{}' '{}'.plist
  3. liddiard revised this gist Apr 26, 2026. 2 changed files with 6 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions export.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    # Run in a dedicated directory. 1-liner to list all settings plist files,
    # convert the list to newline-separated, and write each to a plist file.
    # Run in a dedicated directory. Lists all settings plist files, converts the
    # list to newline-separated, and writes each to a plist file.
    defaults domains | tr ',' '\n' | xargs -I '{}' defaults export '{}' '{}'.plist
    4 changes: 4 additions & 0 deletions import.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    # Run in the directory containing your plist files from the export.sh script.
    # Lists the exported plist files, removes the ".plist" extension, and imports
    # each into system/app settings.
    ls | 'sed s/\.plist$//' | xargs -I '{}' defaults import '{}' '{}'.plist
  4. liddiard revised this gist Apr 26, 2026. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion export.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@
    # Run in a dedicated directory. 1-liner to list all settings plist files,
    # convert the list to newline-separated, and write each to a plist file.

    defaults domains | tr ',' '\n' | xargs -I '{}' defaults export '{}' '{}'.plist
  5. liddiard created this gist Apr 26, 2026.
    4 changes: 4 additions & 0 deletions export.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    # Run in a dedicated directory. 1-liner to list all settings plist files,
    # convert the list to newline-separated, and write each to a plist file.

    defaults domains | tr ',' '\n' | xargs -I '{}' defaults export '{}' '{}'.plist