I'm experimenting with matching changes made in the System Settings app with the output of defaults read, and I made this quick script for help with that.
It's not perfect -- namely, defaults read
outputs in OpenStep format which is very much not machine parseable, but the alternative is using defaults export
which requires you to list a domain, which would be much more complicated (though not impossible using defaults domains
).
You will probably need to add more or less ignored_lines
depending on what apps you use.
Here's the start of a version that polls based on domain. I need to think of a way to parse XML better, but I think this is probably a more viable strategy than the above