Live data from Hacker News

Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal

codeberg.org

1–10 of 17 posts

Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal

#1
This started out as a fork of pydoro and turned into a playground for dataclasses and strict mypy type checking. Some of the advanced features are

- it writes the current status into .local/state/pomoglorbo for i3status/xbar - it is very configurable, including cmd hooks to run after a Pomodoro/break finishes or starts

The layout is compact, and it runs well over SSH/Mosh/Tmux.

Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal
codeberg.org

Re: Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal

#4
post #3

sleep 20m ; mpc pause I keep it simple.

simpler than mine:

  import time
  import argparse

  def main(mins):
    print(f"Starting pomodoro timer: {mins} minutes.")

    for m in range(mins, 0, -1):
        secs = 60
        for s in range(secs, 0, -1):
            print(f"{m-1}:{s-1}    ", end='\r')
            time.sleep(1)

    print("Timer finished - take a break!\a")
    time.sleep(2)
    print("\a")
    time.sleep(2)
    print("\a")
    time.sleep(2)


  if __name__ == "__main__":
      parser = argparse.ArgumentParser(description="Pomodoro Timer.")
    parser.add_argument("mins", type=int, help="minutes to time.")

    args = parser.parse_args()
    main(args.mins)

Re: Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal

#6
post #3

sleep 20m ; mpc pause I keep it simple.

simpler than mine: import time import argparse def main(mins): print(f"Starting pomodoro timer: {mins} minutes.") for m in range(mins, 0, -1): secs = 60 for s in range(secs, 0, -1): print(f"{m-1}:{s-1} ", end='\r') time.sleep(1) print("Timer finished - take a break!\a") time.sleep(2) print("\a") time.sleep(2) print("\a") time.sleep(2) if __name__ == "__main__": parser = argparse.ArgumentParser(description="Pomodoro T…

Good one! That's pretty much how I started and then ended up with Pomoglorbo instead. I have wanted the timer to integrate with timewarrior, and automatically time what I am working and also keep track of my breaks. Another issue is that when your computer sleeps, you'd want to keep counting seconds in the background, so time.sleep(1) will lose accuracy very quickly.

Re: Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal

#7
post #6

Earlier quoted context omitted.

simpler than mine: import time import argparse def main(mins): print(f"Starting pomodoro timer: {mins} minutes.") for m in range(mins, 0, -1): secs = 60 for s in range(secs, 0, -1): print(f"{m-1}:{s-1} ", end='\r') time.sleep(1) print("Timer finished - take a break!\a") time.sleep(2) print("\a") time.sleep(2) print("\a") time.sleep(2) if __name__ == "__main__": parser = argparse.ArgumentParser(description="Pomodoro T…

Good one! That's pretty much how I started and then ended up with Pomoglorbo instead. I have wanted the timer to integrate with timewarrior, and automatically time what I am working and also keep track of my breaks. Another issue is that when your computer sleeps, you'd want to keep counting seconds in the background, so time.sleep(1) will lose accuracy very quickly.

You can use time.sleep in a loop to tick of seconds, but actually check the diff between now and start time to know how much time has passed.

Re: Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal

#10
post #3

sleep 20m ; mpc pause I keep it simple.

simpler than mine: import time import argparse def main(mins): print(f"Starting pomodoro timer: {mins} minutes.") for m in range(mins, 0, -1): secs = 60 for s in range(secs, 0, -1): print(f"{m-1}:{s-1} ", end='\r') time.sleep(1) print("Timer finished - take a break!\a") time.sleep(2) print("\a") time.sleep(2) print("\a") time.sleep(2) if __name__ == "__main__": parser = argparse.ArgumentParser(description="Pomodoro T…

Mine uses Bash:

https://github.com/metacritical/pomodorino

Post reply on HN