Command and library to export macOS preferences.
Project description
macprefs
Export and keep track of changes to your preferences.
How to use
usage: prefs-export [-h] [-o OUTPUT_DIRECTORY] [-c]
optional arguments:
-h, --help show this help message and exit
-o OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY
Where to store the exported data
-c, --commit Commit the changes with Git
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 [-h] [-o OUTPUT_DIRECTORY]
optional arguments:
-h, --help show this help message and exit
-o OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY
Where to store the exported data
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file macprefs-0.1.0.tar.gz
.
File metadata
- Download URL: macprefs-0.1.0.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e98f1187531d558254216b5be9bf71eb215b24f55fb820218016351ceedc0810 |
|
MD5 | 3efa2a764ecc3972943fbd6b44bb0fcf |
|
BLAKE2b-256 | c3fc656d1e6d8b91f77ca595509c03589d1c7fd4ddb79a3fc30c1bcaa1706780 |
File details
Details for the file macprefs-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: macprefs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 388d7f4d72385752557ada568aa40528e0fc521302529e5247b787a837eac8f6 |
|
MD5 | 89e6de66efcfee02f038b6085cd78675 |
|
BLAKE2b-256 | ec333928366a6a63924eb47fe98ab36b363a436e7347d4f909e02e756f6a4f05 |