Skip to content

Instantly share code, notes, and snippets.

@glyph
Last active January 2, 2016 12:59
Show Gist options
  • Save glyph/8306640 to your computer and use it in GitHub Desktop.
Save glyph/8306640 to your computer and use it in GitHub Desktop.
from __future__ import print_function, unicode_literals
from AppKit import NSUserDefaults
defaults = NSUserDefaults.standardUserDefaults()
nsDictionary = defaults.persistentDomainForName_("com.apple.Terminal")
mutable = dict(nsDictionary)
mutable['Window Settings'] = dict([
(k, dict(v, useOptionAsMetaKey=1))
for k, v
in mutable['Window Settings'].items()
])
defaults.setPersistentDomain_forName_(mutable, "com.apple.Terminal")
defaults.synchronize()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment