Skip to main content

Command and library to export macOS preferences.

Project description

macprefs

QA Tests Coverage Status Documentation Status PyPI - Version GitHub tag (with filter) GitHub GitHub commits since latest release (by SemVer including pre-releases)

Export and keep track of changes to your preferences.

How to use

Usage: prefs-export [OPTIONS]

  Export preferences.

Options:
  -K, --deploy-key FILE           Key for pushing to Git repository.
  -c, --commit                    Commit the changes with Git.
  -d, --debug                     Enable debug logging.
  -o, --output-directory DIRECTORY
                                  Where to store the exported data.
  --help                          Show this message and exit.

prefs-export is the main utility. You can export preferences, generate a ~/.macos-like script, and store the results in a Git repository.

My primary usage is like so:

prefs-export -o ~/.config/defaults -c

About the generated shell script

A shell script named exec-defaults.sh will exist in the output directory. It may be executed, but is primarily for copying defaults commands for use in your actual ~/.macos file.

Filtered domains and keys

Certain domains are filtered because they generally do not have anything useful to preserve, such as com.apple.EmojiCache which only has a cache of Emoji usage data.

Some keys are filtered, as they contain values that often changing and non-useful values such as session IDs and UI state (e.g. QtUi.MainWin(Geometry|State|Pos|Size), NSStatusItem Preferred Position).

Automated usage

A command macprefs-install-job is included which will install a daily launchd job. The job name is sh.tat.macprefs

Usage: macprefs-install-job [OPTIONS]

  Job installer.

Options:
  -K, --deploy-key FILE           Key for pushing to Git repository.
  -o, --output-directory DIRECTORY
                                  Where to store the exported data.
  --help                          Show this message and exit.

If the output directory has a .git directory, a commit will be automatically made. Be aware that files will be added and removed automatically.

To stop this job permanently, run launchctl unload -w ~/Library/LaunchAgents/sh.tat.macprefs.plist.

To uninstall this job, after stopping permanently, delete ~/Library/LaunchAgents/sh.tat.macprefs.plist.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

macprefs-0.3.3.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

macprefs-0.3.3-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file macprefs-0.3.3.tar.gz.

File metadata

  • Download URL: macprefs-0.3.3.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.5.5-gentoo-limelight

File hashes

Hashes for macprefs-0.3.3.tar.gz
Algorithm Hash digest
SHA256 bb946a5a61c8020333b7762bda96266cf8ad77e017514d8e589d4471d64a0b5f
MD5 73baecf6f2c2a0e116d02cbb576198f7
BLAKE2b-256 663a25d1123333e3afa220d70b81ef64d6ced56c63d68cc5209cf8c3c651ccc3

See more details on using hashes here.

File details

Details for the file macprefs-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: macprefs-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.5.5-gentoo-limelight

File hashes

Hashes for macprefs-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ae73ee035c318bd4aaac7b7aedb8afd385a5d315bafc14f0b413cad38ddd382e
MD5 483b6c1cafdd5f15a9fb4a4e0e6fe4cc
BLAKE2b-256 548de79ed8a87ad011c1f29a5823845fd17fb2c33c8ccf1750a5cccd45eb9a7d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page