I have written some defaults scripts to have some standard settings I can port to other systems or re-install in the case of a computer crash.
Is there a defaults domain or some other way to add/delete keyboard shortcuts on OS X programmatically?
EDIT:
OK, I know there is com.apple.symbolichotkeys
, but how do I write to it?
I know that I have to use -string
to write a string to an option, like so:
defaults write com.yourdomain.appname variable -string value
But this seems to be an array, containing several values, one of which is also an array. Of course I could just copy that content and write to the defaults file itself, but I would like to do that in the form of a shell command.
ALSO:
Is this really going to be portable? As I don't understand the contents of com.apple.symbolichotkeys
, it might as well be non-portable.