diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-09-06 23:11:32 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-09-06 23:11:32 +0000 |
commit | 0c747be3852e204ddbf9f4081f021b0eea08aa85 (patch) | |
tree | 7f0920be7f8a44f68de83985c576d524fd2776f6 /bin | |
parent | 375772bc4fb32d5cc957268de65eea01620a335a (diff) | |
download | dtas-0c747be3852e204ddbf9f4081f021b0eea08aa85.tar.gz |
Lightly tested, but this seems to work.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/dtas-console | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/dtas-console b/bin/dtas-console index 6d5672b..eb246ee 100755 --- a/bin/dtas-console +++ b/bin/dtas-console @@ -39,6 +39,8 @@ tfmt = update_tfmt(prec_step[prec_nr]) events = [] interval = 1.0 / 10 ** prec_nr +pause = nil + def show_events(lineno, screen, events) Curses.setpos(lineno += 1, 0) Curses.clrtoeol @@ -132,7 +134,7 @@ begin else Curses.setpos(lineno += 1, 0) Curses.clrtoeol - Curses.addstr(cur['paused'] ? 'paused' : 'idle') + Curses.addstr(cur['paused'] ? "paused #{pause}" : 'idle') Curses.setpos(lineno += 1, 0) Curses.clrtoeol end @@ -153,6 +155,12 @@ begin Curses.clear when w event = w.res_wait + case event + when "pause" + pause = current['infile'] || current['command'] + when %r{\Afile } + pause = nil + end events << "#{Time.now.strftime(tfmt)} #{event}" # something happened, refresh current # we could be more intelligent here, maybe, but too much work. |