From 41d6fa74170e87903f09ad9fee540b7424bef91a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 20 Apr 2018 14:42:32 +0200 Subject: [PATCH] Implement command to change layout from cli --- solvable/src/event_handler_main.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/solvable/src/event_handler_main.py b/solvable/src/event_handler_main.py index d0b64be..fe3fb2d 100644 --- a/solvable/src/event_handler_main.py +++ b/solvable/src/event_handler_main.py @@ -43,6 +43,14 @@ class TestCommands(TerminalCommands): 'shellcmd': f'{seppuku}\n'} }) + def command_changelayout(self, *args): + message = {'key': 'dashboard', + 'data': {'command': 'layout', + 'layout': args[0]}} + if len(args) >= 2: + message['data']['hide_messages'] = (args[1] in ['yes', 'y', '1', 'true']) + TFWServerConnector().send(message) + if __name__ == '__main__': # pylint: disable=invalid-name