Add interval timer (start another timer when one expires)

Asked by The Dave

I've been searching the net for a good interval timer for linux.

By interval timer, I mean having the ability to run a 25 minute timer followed immediately by a 5 minute timer.

This is useful for working out (run 10 minutes rest 1 minute), for the Pomodoro time management technique (work 25 minutes play for 5).

At it's simplest, I envision adding a drop-down to the start timer dialog that specifies the next preset to start, and a column in the presets list that specifies the next preset. So for the examples above, we could have:

Hours: 0
Minutes: 10
Seconds: 0
Name: Workout
Next Preset: Rest ^

Presets:
Play (00:05:00) Pomodoro
Pomodoro (00:25:00) Play
Rest (00:01:00) -> Workout
Workout (00:10:00) -> Rest

As the next revision of this feature (and to complete it in my eyes). I would add nested groups of timers, with an iterations on the groups, and customizable notifications per group and timer, and the option to display progress in a window.

So, something like this:
Presets
Pomodoro Work Day:
 Work 2 iterations
     Pomodoro 4 iterations
        On-task (00:25:00)
        Play (00:05:00)
    Big Break (00:10:00)
  Meal Break (00:45:00)

Workout 2 iterations
  Aerobic 2 iterations
     Run (00:10:00)
     Rest (00:01:00)
  Anerobic 1 Iteration
     Pushups (00:05:00)
     Crunches (00:05:00)

This would be my first F/OSS software project. And, I'm not going to lie, my Python programming skills are a little rusty. But, I'll give it a shot as an intellectual exercise to try to implement this.

I'm not sure about the whole bzr rev control, and when to add my branch to the code tree, so in the meantime I'll keep my code on my SVN server.

I'd love folks to volunteer to field my stupid questions as they arise (and they WILL arise), or at least give me direction on where to ask them.

Question information

Language:
English Edit question
Status:
Solved
For:
Timer Applet Edit question
Assignee:
No assignee Edit question
Solved by:
Kenny Meyer
Solved:
Last query:
Last reply:
Revision history for this message
The Dave (thedave) said :
#1

Ahem . . correction, my python is rusty.

Revision history for this message
Kenny Meyer (knny-myer) said :
#2

Hello Dave,

Firstly, is this a feature request or a request to help you developing your own project?

I like your idea, and it is possible to implement such a feature in Timer Applet, though Timer Applet is entirely programmed in Python, not in C.

Please, get this clear: I will not volunteer stupid questions, nor any stupid ideas, but yours sounds reasonable and serious to me, and if you're interested we/you could start implementing this. As you may have seen, I am planning a Pomodoro ticking sound and your idea would somehow complement/enhance this idea further.

Also, you have to understand that Timer Applet is a Timer Applet not a Pomodoro machine. So, this feature has to be optional for the end-user, which would be like ticking a check-box in the preferences dialog for enabling/disabling this.
If you don't agree with this then please let me know. Otherwise, there's still the possibility for you to create a fork from Timer Applet and make your own project independent from Timer Applet - though it would be nice to cooperate. :)

Let me know what you think.

Thanks,
Kenny

Revision history for this message
The Dave (thedave) said :
#3

Hi Kenny-

This is a feature request and/or a request for developing my own
project. I had just about decided to quickly write this in Mono C# or
Java, but I think timer-applet is fairly close. I'd rather contribute to
the timer applet, than introduce another one.

Regarding C v Python. I saw my mistake shortly after I posted it. I'm
looking at another GTK app written in C. I amended the reference in the
comments.

Regarding stupid questions:This is a serious request/offer. But, I'm
woefully ignorant of the launchpad process and tools, and I may ask
seemingly stupid/obvious questions and make some mistakes. I'm an
experienced commercial programmer, in many languages and disciplines,
but I'm a novice at Python. In the past I've found that I can work in a
project written in a new language, as most of what I'll be changing is
syntax. But, if we get into significant feature work, I may trip up a
bit on the object model.

Regarding a Pomodoro timer: I have no interest in making this a Pomodoro
machine. I just want a simple interval timer. After cutting my teeth
on this, I would consider branching this as a Pomodoro-specific app. For
now I would rather keep the effort as simple as possible with simple
iterations.

I have not run the current branch of timer-applet, but looking at the UI
they've already taken steps in the direction I proposed.

I think the first iteration would be to add two optional fields to the
Timer Presets:

        Next Timer (dropdown of defined Presets) - When this timer
        completes, trigger "Next Timer" to start.

        Auto Start - This would automatically start the "Next Timer"
        when this one completes, or restart this timer if no "Next
        Timer" is assigned.

Also, add a "Start %s" button to the timer complete notification and the
panel button to start the Next Timer when "Auto Start" is not selected.

I've read your requirement for the clock tick, and custom alarm sounds
and it sounds like we'd be making changes in the same parts of the UI
and code.

As far as next steps, I guess I should write up a blue print of this
(most of it's included above), and submit a bug.

Which e-mail is best for you?

D.

Revision history for this message
Best Kenny Meyer (knny-myer) said :
#4

> Regarding stupid questions:This is a serious request/offer. But, I'm
> woefully ignorant of the launchpad process and tools, and I may ask
> seemingly stupid/obvious questions and make some mistakes. I'm an
> experienced commercial programmer, in many languages and disciplines,
> but I'm a novice at Python. In the past I've found that I can work in a
> project written in a new language, as most of what I'll be changing is
> syntax. But, if we get into significant feature work, I may trip up a
> bit on the object model.
No problem, I can give you some mentoring if needed. Though, if you have
experience with Java and C# I am confident that you'll learn Python in a very
short time. :)

> Regarding a Pomodoro timer: I have no interest in making this a Pomodoro
> machine. I just want a simple interval timer. After cutting my teeth
> on this, I would consider branching this as a Pomodoro-specific app. For
> now I would rather keep the effort as simple as possible with simple
> iterations.
Agreed.

> I think the first iteration would be to add two optional fields to the
> Timer Presets:
>
> Next Timer (dropdown of defined Presets) - When this timer
> completes, trigger "Next Timer" to start.
>
> Auto Start - This would automatically start the "Next Timer"
> when this one completes, or restart this timer if no "Next
> Timer" is assigned.
Perfect!

I'll create a branch for you in a moment.

> As far as next steps, I guess I should write up a blue print of this
> (most of it's included above), and submit a bug.
Yes, I have seen you created a bug. Thanks.

> Which e-mail is best for you?
You can reach me at knny DOT myer AT gmail DT com . Please, contact me there to
make the next steps.

Onward and upwards,
Kenny Meyer

Revision history for this message
The Dave (thedave) said :
#5

Thanks Kenny Meyer, that solved my question.

Revision history for this message
Shock (mmiron) said :
#6

pomodoro technique support would be cool!

Revision history for this message
hjdivad (y-launchpad-hjdivad-com) said :
#7

+1 enthusiasm for this feature.

Revision history for this message
Marco Giancotti (ma.giancotti) said :
#8

I would definitely love this!