Beispiel #1
0
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()
Beispiel #2
0
 def run(self):
     self._draw()
     threading.Thread(target=lambda: every(0.4, self._draw),
                      daemon=True).start()
     self.application.run()
Beispiel #3
0
def main():
    draw()
    threading.Thread(target=lambda: every(0.4, draw), daemon=True).start()
    application.run()