Compare commits

..

No commits in common. "2c7f6fc759510059b0e3046444c577472f4049eb" and "7c437fb7594cf771f04e96d8ff4c6ce08156f2ea" have entirely different histories.

View file

@ -56,7 +56,6 @@ class Stopwatch:
screen: curses.window screen: curses.window
next_line = 0 next_line = 0
enable_animation: bool enable_animation: bool
old_ui: bool
animation: Animation animation: Animation
BUFFER_LINE = '=' * 120 BUFFER_LINE = '=' * 120
@ -64,13 +63,12 @@ class Stopwatch:
COL1_Y = 44 COL1_Y = 44
COL2_Y = 90 COL2_Y = 90
def __init__(self, beep_at, enable_sound, screen: curses.window, enable_animation: bool, old_ui: bool) -> None: def __init__(self, beep_at, enable_sound, screen: curses.window, enable_animation: bool) -> None:
self.screen = screen self.screen = screen
self.screen.addstr(0, 0, self.BUFFER_LINE) self.screen.addstr(0, 0, self.BUFFER_LINE)
self.next_line += 2 self.next_line += 2
self.start_time = datetime.datetime.now().replace(microsecond=0) self.start_time = datetime.datetime.now().replace(microsecond=0)
self.enable_animation = enable_animation self.enable_animation = enable_animation
self.old_ui = old_ui
if enable_sound: if enable_sound:
self.enable_sound = enable_sound self.enable_sound = enable_sound
if not beep_at <= 0: if not beep_at <= 0:
@ -169,15 +167,11 @@ def main():
curses.noecho() curses.noecho()
curses.cbreak() curses.cbreak()
if args.legacy_ui:
eprint("Old UI not implemented.")
timer = Stopwatch( timer = Stopwatch(
beep_at=args.beep[0], beep_at=args.beep[0],
enable_sound=args.sound, enable_sound=args.sound,
screen=stdscreen, screen=stdscreen,
enable_animation= not args.no_animation, enable_animation= not args.no_animation
old_ui=args.legacy_ui
) )
timer.display() timer.display()
except KeyboardInterrupt: except KeyboardInterrupt: