aboutsummaryrefslogtreecommitdiffstats
path: root/ssh.py
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-09-15 16:51:05 -0400
committerJesse Luehrs <doy@tozt.net>2014-09-15 16:51:05 -0400
commit13c007e097409a9545da0f6b7c191eab06c1c99d (patch)
treef4c9742ebb5ac707f9229170aea046dcbfa38422 /ssh.py
parent840ea5547e66f512c4a225f23be06c07f8c49d36 (diff)
downloadpython-termcast-server-13c007e097409a9545da0f6b7c191eab06c1c99d.tar.gz
python-termcast-server-13c007e097409a9545da0f6b7c191eab06c1c99d.zip
start working on providing more information in the watcher screen
Diffstat (limited to 'ssh.py')
-rw-r--r--ssh.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/ssh.py b/ssh.py
index 868a708..1bcb6d5 100644
--- a/ssh.py
+++ b/ssh.py
@@ -77,9 +77,22 @@ class Connection(object):
def _display_streamer_screen(self, streamers):
self.chan.send("\033[2J\033[HWelcome to Termcast!")
- row = 3
+ self.chan.send(
+ "\033[3H %-20s %-15s %-15s" % (
+ "User", "Terminal size", "Idle time",
+ )
+ )
+ row = 4
for streamer in streamers:
- self.chan.send("\033[%dH%s) %s" % (row, streamer["key"], streamer["name"].decode('utf-8')))
+ key = streamer["key"]
+ name = streamer["name"].decode('utf-8')
+ size = "(%dx%d)" % (streamer["cols"], streamer["rows"])
+ idle = streamer["idle"]
+ self.chan.send(
+ "\033[%dH%s) %-20s %-15s %-15s" % (
+ row, key, name, size, idle
+ )
+ )
row += 1
self.chan.send("\033[%dHChoose a stream: " % (row + 1))