def main(): parser = argparse.ArgumentParser("pydoro", description="Terminal Pomodoro Timer") parser.add_argument( "-e", "--emoji", action="store_true", help="If set, use tomato emoji instead of the ASCII art", ) parser.add_argument( "--focus", help="focus mode: hides clock and \ mutes sounds (equivalent to --no-clock and --no-sound)", action="store_true", ) parser.add_argument("--no-clock", help="hides clock", action="store_true") parser.add_argument("--no-sound", help="mutes all sounds", action="store_true") args = parser.parse_args() tomato.no_clock = args.no_clock or args.focus tomato.no_sound = args.no_sound or args.focus tomato.emoji = args.emoji draw() threading.Thread(target=lambda: every(0.4, draw), daemon=True).start() application.run()
def run(self): self._draw() threading.Thread(target=lambda: every(0.4, self._draw), daemon=True).start() self.application.run()
def main(): draw() threading.Thread(target=lambda: every(0.4, draw), daemon=True).start() application.run()