set default profile from the json file
This commit is contained in:
parent
b669996180
commit
f387f4886c
|
@ -70,9 +70,12 @@ if __name__ == '__main__':
|
|||
OPTIONS,dbus_options = terminatorlib.optionparse.parse_options()
|
||||
|
||||
if OPTIONS.configjson:
|
||||
layoutname = ConfigJson().extend_config(OPTIONS.configjson)
|
||||
configjson = ConfigJson()
|
||||
layoutname = configjson.extend_config(OPTIONS.configjson)
|
||||
if layoutname and ((not OPTIONS.layout) or OPTIONS.layout == 'default'):
|
||||
OPTIONS.layout = layoutname
|
||||
if not OPTIONS.profile:
|
||||
OPTIONS.profile = configjson.get_profile_to_use()
|
||||
|
||||
TERMINATOR = Terminator()
|
||||
TERMINATOR.set_origcwd(ORIGCWD)
|
||||
|
|
|
@ -9,8 +9,10 @@ JSON_PROFILE_NAME = "__internal_json_profile__"
|
|||
JSON_LAYOUT_NAME = "__internal_json_layout__"
|
||||
|
||||
class ConfigJson(object):
|
||||
|
||||
profile_to_use = 'default'
|
||||
|
||||
def get_profile_to_use(self):
|
||||
return self.profile_to_use
|
||||
|
||||
def build_single_tab_layout(self, layoutjson, vertical):
|
||||
dbg ('Budiling a single tab layout from json: %s ' % layoutjson)
|
||||
|
|
Loading…
Reference in New Issue