Skip to content

Instantly share code, notes, and snippets.

@infirit
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save infirit/23362df9224138ab2192 to your computer and use it in GitHub Desktop.

Select an option

Save infirit/23362df9224138ab2192 to your computer and use it in GitHub Desktop.
from gi.repository import Gio
base_schema = 'org.mate.terminal.global'
profile_schema = 'org.mate.terminal.profile'
base_profile_path = '/org/mate/terminal/profiles/'
base_settings = Gio.Settings.new(base_schema)
default_profile = base_settings.get_string('default-profile') + '/'
default_path = base_profile_path + default_profile
print profile_schema
print default_path
profile_settings = Gio.Settings.new_with_path(profile_schema, default_path)
print 'plugin test'
system_schema = 'org.mate.interface'
profile_schema = 'org.mate.terminal.profile'
profile_path = '/org/mate/terminal/profile/'
system_settings = Gio.Settings.new(system_schema)
default_profile = Gio.Settings.new('org.mate.terminal.global').get_string('default-profile')
settings = Gio.Settings.new_with_path(profile_schema, profile_path + default_profile + '/')
settings.connect('changed')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment