Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set a duration in XXmYYs format #19

Open
pixelastic opened this issue May 30, 2022 · 1 comment
Open

Unable to set a duration in XXmYYs format #19

pixelastic opened this issue May 30, 2022 · 1 comment

Comments

@pixelastic
Copy link

Hello,

The README mentions that one could set a custom duration in the XXmYYs format, but this doesn't seem to be implemented.

$ pomodoro start --duration 22m30s
Error: invalid argument "22m30s" for "-d, --duration" flag: strconv.ParseInt: parsing "22m30s": invalid syntax

I was looking for this feature to be able to implement my own "pause/resume" mechanism, where I would save the remaining time in a /tmp/ file before finishing a session, and resuming on the same duration when starting it over. This helps me for micro-interruption (a coworker asking a question that takes less than 30s to answer, and not breaking the flow too much).

But currently it seems that I cannot start a session with a finer granularity than minutes

@justincampbell
Copy link
Member

@pixelastic I chose to store the duration in minutes in the current/history files because I thought it was simpler to for people to read and edit them if needed. In practice though, I don't find myself editing it a lot. I'm not opposed to changing both the storage format and CLI args to use the Go duration syntax (and maybe support bare numbers as minutes for backward compatibility).

I'd love to add pausing into this tool itself, and would be happy to help implement it if you have an idea of how it would work. Are you planning to store a file with the time remaining, and then resume it? Does resuming change the pomodoro start time?

Writing this out for my own understanding:

  1. Start Pomodoro, start time is 10:00am, duration 25m.
  2. At 10:10 you pause. Duration remaining is 15m.
  3. At 10:15 you resume. The pause is removed and then...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants