Implement command to change layout from cli

This commit is contained in:
Kristóf Tóth 2018-04-20 14:42:32 +02:00
parent d6ff80230f
commit 41d6fa7417
1 changed files with 8 additions and 0 deletions

View File

@ -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