Skip to content

Commit

Permalink
Fix for issue gnome-terminator#676: title field not seem to be workin…
Browse files Browse the repository at this point in the history
…g with JSON profile
  • Loading branch information
rkashinin committed Apr 2, 2023
1 parent 10e9d04 commit 468ef23
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions terminatorlib/configjson.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,24 @@ def build_multi_tab_layout(self, layoutjson, vertical):

def build_terminal_layout(self, layoutjson, children, parent, order):
dbg ('Building a terminal from json: %s' % layoutjson)


def from_json(layout_name, json_name=None):
if json_name is None:
json_name = layout_name

if json_name in layoutjson:
children[parent + "." + str(order)].__setitem__(layout_name, layoutjson[json_name])

children[parent + "." + str(order)] = {
'type': 'Terminal',
'order': order,
'parent': parent,
'profile': self.profile_to_use,
'command': layoutjson['command']
'profile': self.profile_to_use
}


from_json('command')
from_json('title')

def build_container_layout(self, layoutjson, children, parent, order, vertical):
if len(layoutjson) == 1:
layoutjson = layoutjson[0]
Expand Down

0 comments on commit 468ef23

Please sign in to comment.