Skip to content

Instantly share code, notes, and snippets.

@kaorimatz
Created August 8, 2012 07:15
Show Gist options
  • Save kaorimatz/3293038 to your computer and use it in GitHub Desktop.
Save kaorimatz/3293038 to your computer and use it in GitHub Desktop.
Dumping gnome-terminal's profile settings
#!/bin/env python
def main(name):
import gconf
import pickle
client = gconf.Client()
for p in client.all_dirs('/apps/gnome-terminal/profiles'):
visible_name = client.get_value('%s/visible_name' % p)
print name
if name != visible_name:
continue
entries = {}
for e in client.all_entries(p):
value = client.get_value(e.key)
entries[e.key] = value
print 'Dumping all entries of "%s"' % visible_name
with open(visible_name + '.pickle', 'wb') as f:
pickle.dump(entries, f)
if __name__ == '__main__':
import sys
if len(sys.argv) != 2:
print 'usage: %s PROFILE_NAME' % sys.argv[0]
exit()
main(sys.argv[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment