olimorris / tmux-pomodoro-plus

πŸ… Incorporate the Pomodoro technique into your tmux workflow
MIT License
274 stars 23 forks source link

[Feature Request] Pause Pomodoro #28

Closed hatredholder closed 11 months ago

hatredholder commented 11 months ago

How about a Pause feature? Instead of cancelling a Pomodoro completely, you just freeze the time until you Unpause it back on.

olimorris commented 11 months ago

Great suggestion. I'm in the process of refactoring the plugin so will add this to the list of proposed enhancements.

olimorris commented 11 months ago

Hey @hatredholder ! I've made some quite large changes to the plugin in PR #27. One of which is this feature request.

In the new PR, whichever key you've mapped to start a Pomodoro can now function as a start and a pause mapping. At any point in a Pomodoro or a break you can pause progress and resume as needed.

I've also added the ability to have intervals and a longer break.

I suspect there's some bugs that may need ironing out so would love you to test this out. Not sure how neatly you can do that with TPM so you can clone this PR locally and add run '[PATH_TO_DIR]/tmux-pomodoro-plus/pomodoro.tmux' to your tmux config.

CC @Meuko

hatredholder commented 11 months ago

I suspect there's some bugs that may need ironing out so would love you to test this out.

Just tried pausing out, works very smoothly, didn't stumble upon any bugs so far. But there's something I would love for you to add.

Would it be possible to add a frozen timer to the status when a Pomodoro is paused? Right now it only shows the "⏸︎" emoji, I think it would be pretty nice to have a timer next to it.

olimorris commented 11 months ago

Thanks for testing! I've now added the ability to skip a timer or a break as well. Although feel the default keymap for that, _ is a bit dumb.

Would it be possible to add a frozen timer to the status when a Pomodoro is paused? Right now it only shows the "⏸︎" emoji, I think it would be pretty nice to have a timer next to it.

That's a very fair ask. I had been in two minds about this so will look to add it in

olimorris commented 11 months ago

@hatredholder - Just added that in now

hatredholder commented 11 months ago

@hatredholder - Just added that in now

The frozen timer works flawlessly! Thank you!

I also found a rather small bug: when you start a Pomodoro using the timer menu, you have to use prefix+p to make the timer start.

olimorris commented 11 months ago

I also found a rather small bug: when you start a Pomodoro using the timer menu, you have to use prefix+p to make the timer start.

Great spot. I don't actually use the menu's so will investigate.

Gotta ask, is that your kitten in your profile picture?! Or a metaphor for being in too deep πŸ˜† ?

hatredholder commented 11 months ago

I also found a rather small bug: when you start a Pomodoro using the timer menu, you have to use prefix+p to make the timer start.

Great spot. I don't actually use the menu's so will investigate.

Gotta ask, is that your kitten in your profile picture?! Or a metaphor for being in too deep πŸ˜† ?

Second thing. Hahaha

olimorris commented 11 months ago

Just pushed that fix now. Thanks for spotting.

I need to add intervals and long breaks to the menu as well

hatredholder commented 11 months ago

Another discovery: the Pomodoro timer still asks if user wants to take a break even when the timer is paused.

olimorris commented 11 months ago

Another discovery: the Pomodoro timer still asks if user wants to take a break even when the timer is paused.

That's really odd. Could you share your settings and I'll take a look?

hatredholder commented 11 months ago

That's really odd. Could you share your settings and I'll take a look?

Here:

set -g @pomodoro_auto_start_break true
set -g @pomodoro_repeat true

Those are all the settings I've configured, the rest is default.

hatredholder commented 11 months ago

Another discovery: the Pomodoro timer still asks if user wants to take a break even when the timer is paused.

I think it only happens when you're paused through the whole Pomodoro session, like if you started a timer for 15 minutes, pause it and wait through these 15 minutes while being paused, it will ask for a break.

olimorris commented 11 months ago

Yep I've been able to recreate it. Thanks!

olimorris commented 11 months ago

Hopefully should be fixed in the latest commit

olimorris commented 11 months ago

I've merged this into main πŸš€