Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #676: title field not seem to be working with JSON profile #736

Merged
merged 3 commits into from
Aug 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)][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