aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/fancy_sleep.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/fancy_sleep.py b/scripts/fancy_sleep.py
index a87b33c..e65ad94 100755
--- a/scripts/fancy_sleep.py
+++ b/scripts/fancy_sleep.py
@@ -191,7 +191,6 @@ def test_parse_time():
def fancy_sleep_display(target_time):
print()
print('\n'*5, '\x1b[5A', sep='', end='')
- print('\x1b[s', end='') # save cursor
original_termios_attr = termios.tcgetattr(sys.stdin)
noecho_termios_attr = original_termios_attr[:]
noecho_termios_attr[3] &= ~termios.ECHO
@@ -205,10 +204,11 @@ def fancy_sleep_display(target_time):
minutes = int(delta / 60) % 60
seconds = int(delta) % 60
- print('\x1b[u', end='') # restore cursor
+ print('\x1b[s', end='') # save cursor
time_string = '%02d:%02d:%02d' % (hours, minutes, seconds)
#print('\rremainining time: %s' % time_string, end='')
print_translated(time_string)
+ print('\x1b[u', end='') # restore cursor
time.sleep(1)
finally: