summaryrefslogtreecommitdiff
path: root/ick
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-10-18 20:03:08 +0300
committerLars Wirzenius <liw@liw.fi>2015-10-18 20:03:08 +0300
commit4d1dfd4bfb68609ac9b46ec7146309608f54f1b6 (patch)
tree645bc81894c088e49d5941f03da211fb6fb2cdfd /ick
parente14aebabc4e5fa05f8318ba27335f3477052c8cd (diff)
downloadick-4d1dfd4bfb68609ac9b46ec7146309608f54f1b6.tar.gz
Use as much of the terminal as possible
Diffstat (limited to 'ick')
-rwxr-xr-xick27
1 files changed, 12 insertions, 15 deletions
diff --git a/ick b/ick
index d65eef2..ae6117e 100755
--- a/ick
+++ b/ick
@@ -64,22 +64,19 @@ class Ick(cliapp.Application):
ts = ttystatus.TerminalStatus(period=0)
if not self.settings['quiet']:
- ts.format(
+ width, height = ts.get_terminal_size()
+ format_lines = [
'%ElapsedTime() '
- 'Project %Index(project,projects) %String(project_name)\n'
- 'Pipeline: %String(pipeline)\n'
- 'Step: %String(step)\n'
- 'Target: %String(target)\n'
- 'Command: %String(command)\n'
- 'Output: %String(line0)\n'
- ' %String(line1)\n'
- ' %String(line2)\n'
- ' %String(line3)\n'
- ' %String(line4)\n'
- ' %String(line5)\n'
- ' %String(line6)\n'
- ' %String(line7)'
- )
+ 'Project %Index(project,projects) %String(project_name)',
+ 'Pipeline: %String(pipeline)',
+ 'Step: %String(step)',
+ 'Target: %String(target)',
+ 'Command: %String(command)',
+ 'Output: %String(line0)',
+ ]
+ while len(format_lines) < height - 1:
+ format_lines.append(' : ')
+ ts.format('\n'.join(format_lines))
ts.max_output_lines = 8
return ts