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.4.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

macprefs-0.3.4-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: macprefs-0.3.4.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.9.5-gentoo-groovin

File hashes

Hashes for macprefs-0.3.4.tar.gz
Algorithm Hash digest
SHA256 9b1b8e0fcd0d7027dbd1d2706c773ef7f8620c97223219b3294ee0a4ee5e9908
MD5 8e3230e7bf4d610d65a584e4bed228db
BLAKE2b-256 194b35f85578d333d45f9fc5aec025f2f8ab0692abb7c1695d47ac4a0da2f05a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: macprefs-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.9.5-gentoo-groovin

File hashes

Hashes for macprefs-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 61e2102a28fc8e2849eebdf9a04f08ad0d44c0055aa6dc36b5d91be35b3ac9d1
MD5 ba9f9dc0c8025eb2295a6d3b2e4fe5b4
BLAKE2b-256 bbda5b44e74166fb28c0954fd77372e4f8830eceb72231980d247a2c89e3e3c4

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