Hacker News new | ask | show | jobs
by gugagore 1919 days ago
I have not found a way to script the `Keyboard Preferences -> Input Sources` settings. I even versioned (in git) a ton of the `.plist` (property list) files in `~/Library/Preferences/` (they are binary files, but one can use `plutil` to get a textual XML representation). I think I arrived at the conclusion that these settings are persisted on a global / system level, and that there was basically no solution. I would be happy to be proven wrong!

When I was starting from scratch with macOS a few months ago, I had that sense of fresh new beginning. I wanted to have all of the configuration scriptable and versioned. Unfortunately those preferences files also include a bunch of timestamps and dates and window locations, so it ends up being not a great idea.

1 comments

> (they are binary files, but one can use `plutil` to get a textual XML representation)

You can get a JSON representation now too. Figured that out with Safari bookmarks .webloc. They’re basically plist files and used plutil to convert it to JSON