olimorris / tmux-pomodoro-plus

🍅 Incorporate the Pomodoro technique into your tmux workflow
MIT License
274 stars 23 forks source link

Long break #16

Closed mkdior closed 11 months ago

mkdior commented 1 year ago

Just went through the code and couldn't find anything for long breaks, are these to be implemented or can we create a new issue for it?

olimorris commented 1 year ago

Hey @Meuko. Yep you're right there isn't currently anything in there for long breaks. Happy to accept a PR for this.

If I recall, it's generally 4 pomodoros followed by a 30 min break.

mkdior commented 1 year ago

Yeah, correct, the break time should be variable though, just like the current work time ( which can be customized through the menu ), would love to take a crack at this, feel free to keep this issue open, I'll do it one I got some free time on my hands.

olimorris commented 1 year ago

Awesome and please do. If I start any work on it I'll tag you for your feedback. Keen to ensure that the 4 pomodoros and the long break duration are variables.

mkdior commented 1 year ago

Thanks for the tag, appreciate it! I'm working on adding the long break now. I've diagrammed it as follows (super simple lmao).

image

So, in order to introduce the long break, we'll also allow the user to set an interval. So for example: I want to work in 25 minute blocks, with 4 breaks (which I call 4 intervals). Once 4 interval has been hit, we start the long break. We reset onwards.

Does that sound good? @olimorris

olimorris commented 1 year ago

Firstly, ❤️ the diagram. Yep super simple and makes absolute sense.

In terms of implementation, do you envisage writing the intervals to a txt file in the same way as we do in the pomodoro.sh file?

Also...wondering if we should display the interval count in the status line. Something like [interval][tomato emoji][countdown]. What do you think?

mkdior commented 1 year ago

In terms of implementation, do you envisage writing the intervals to a txt file in the same way as we do in the pomodoro.sh file?

Yeah 100%, I did some googling around and it's the best practice in terms of session management. I think it's best that everything should be restorable in the future, imagine the user's tmux client crashes for some reason, would be great to continue where user left off (might be something for later).

Also, thanks for asking that because I was also wondering what your use-case personally is for storing information locally, is it also for pomodoro session recovery?

Also...wondering if we should display the interval count in the status line. Something like [interval][tomato emoji][countdown]. What do you think?

Yess, I like this, that's a great idea, I will add that in a subsequent PR (to keep them small).

I'm still playing around a little bit and testing things out, once I'm done I'll send over the PR, can't wait to get roasted :D

olimorris commented 1 year ago

Also, thanks for asking that because I was also wondering what your use-case personally is for storing information locally, is it also for pomodoro session recovery?

Tbh no real use case. I remember I followed a couple of other plugins regarding storing state and I quite liked the idea that if I closed my terminal, opened it again, the timer was preserved.

I'm still playing around a little bit and testing things out, once I'm done I'll send over the PR, can't wait to get roasted :D

Productivity through the roof 👏🏼 !! Really excited for this.

olimorris commented 1 year ago

@Meuko I saw you've made a tonne of progress on the long break implementation. It looks really promising. Fancy submitting a PR and we can riff on it over the coming weeks?

mkdior commented 1 year ago

@Meuko I saw you've made a tonne of progress on the long break implementation. It looks really promising. Fancy submitting a PR and we can riff on it over the coming weeks?

Hey, I'll get to this ASAP and finish it, I'll open a PR once I push the final changes. Thanks for the pings, been a bit swamped the last few weeks :x

olimorris commented 1 year ago

Hey @Meuko. Could you turn the work you've done into a PR? I'll be happy to take it over to complete. I think we're nearly there and would love for your work to be credited in the repo.