News for hackers. Stuff that matters.

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

https://codeberg.org/justusw/Pomoglorbo

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.

( 15 comments | 2 points | on HN )
Re:Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal by alejoar on Wednesday June 19, 2024 @04:58AM (#40726310)
Nice! My only grievance is that for some reason J is up and K is down!
Re:Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal by justusw on Wednesday June 19, 2024 @06:08AM (#40726748)
Thanks! Nice find. I've just fixed the j/k mixup and made version 2024.6.19.3 available on PyPI / codeberg (https://codeberg.org/justusw/Pomoglorbo)
Re:Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal by pvdebbe on Wednesday June 19, 2024 @05:04AM (#40726353)

    sleep 20m ; mpc pause
I keep it simple.
Re:Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal by globalnode on Wednesday June 19, 2024 @06:04AM (#40726724)
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 by justusw on Wednesday June 19, 2024 @06:10AM (#40726762)
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 by jbaber on Wednesday June 19, 2024 @07:30AM (#40727232)
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 by pankajdoharey on Wednesday June 19, 2024 @11:27AM (#40729173)
Re:Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal by argiopetech on Wednesday June 19, 2024 @09:09AM (#40727943)
Probably easier to use shell history, but I like a loop.

  while () ; do sleep 20m; mpv bing.mp3; read; done
Re:Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal by meribold on Wednesday June 19, 2024 @11:55AM (#40729480)
Mine has an ASCII cow to keep you motivated and accountable: https://github.com/meribold/muccadoro.
Re:Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal by localfirst on Wednesday June 19, 2024 @12:11PM (#40729614)
just tried to run it and it says i dont have cowsay command which is just an output of a text based cow with a cartoon bubble

So far on my M1:

1. I tried to install Pomoglorbo, fails due to python requirement

2. Scrolling down I find muccadoro, fails due to dependency

3. 10 minutes in im feeling the impact and inefficient

4. Should've just kept moving

Re:Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal by timetraveller26 on Wednesday June 19, 2024 @06:15PM (#40733007)

  #pomodoro.sh
  while true; do
    echo "Time to work, dumbass" | festival --tts
    sleep 25m || rm -rf /
    echo "Have some rest, dumbass" | festival --tts
    sleep 5m
  done
Re:Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal by atsaloli on Thursday June 20, 2024 @04:34PM (#40743056)
What’s the “rm -rf /“ for?
Re:Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal by argiopetech on Thursday June 20, 2024 @08:20PM (#40744917)
It adds an incentive not to cancel the pomodoro.
Re:Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal by localfirst on Wednesday June 19, 2024 @12:04PM (#40729555)
couldn't install it because i have python 3.10
Re:Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal by justusw on Wednesday June 19, 2024 @09:22PM (#40733987)
Thanks for your feedback. You are right. I've lowered the minimum version to Python 3.10. If you want to give it another try, the package is on PyPI now.